我正在跟随书籍《用R进行计算机时代的微积分》学习,但无法运行函数slice_plot(用于绘制函数的第一个函数)。 已经安装了库mosaic,mosaicCalc和mosaicModel。我不知道我缺少什么。
这是书中所需的带有图书馆的代码:
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))