【发布时间】:2020-11-04 16:01:55
【问题描述】:
我刚开始学习 R,想在函数中添加曲线。 但是收到“逻辑错误(x,c(0.05,3)):找不到对象't_0'”
logistic<-function(t,theta=c(b,t_0)) {
return((exp(b*(t-t_0))/(1+exp(b*(t-t_0))))) #function
}
x<-c(-30:30)
curve(logistic(x,c(0.05,3)),from=-30, to=30, add=TRUE)
【问题讨论】: