3

I'm following the book "Computer-age Calculus with R" but cannot run the function slice_plot( which is the first one used for graphing functions). The library mosaic, mosaicCalc and mosaicModel are installed. I don't know what I'm missing.

this is the code with the libraries required by the book:

library(mosaic)
library(mosaicCalc)
library(mosaicModel)
library(akima)

drug_remaining <- function(dose, duration, time_constant){
  dose * exp(-duration / time_constant)
}

slice_plot(
  drug_remaining(dose = 100, time_constant = 4, duration = t) ~ t, 
  domain(t = 0:20))

agustin
  • 95
  • 6

1 Answers1

4

I've found the function slice_plot() and countour_plot() are still in development in a beta version of the mosaicCalc package, to use them we need to install the beta version running this code:

remotes::install_github("ProjectMOSAIC/mosaicCalc", ref="beta")

https://github.com/ProjectMOSAIC/mosaicCalc/issues/4

agustin
  • 95
  • 6
  • 1
    If you've already installed mosaicCalc, to run slice_plot you'll need to remove the previous version before installing the beta: remove.packages("mosaicCalc") – hoho Aug 05 '21 at 23:31