drc 错误 "Error in parmVec[3] - respl : non-numeric argument to binary operator"

Error in drc "Error in parmVec[3] - respl : non-numeric argument to binary operator"

我对使用 R 还很陌生。我目前正在尝试使用 drc 以 运行 4PL 曲线来分析 ELISA 数据。我已手动输入标准数据并生成曲线,但我无法返回样本数据 (DOSEx) 的浓度。 运行使用 ED 函数时,我收到以下错误:“parmVec[3] 中的错误 - respl:二元运算符的非数字参数”这可能是一个简单的问题,我们将不胜感激。

我的代码如下:

library(drc)
dat<- data.frame(Conc=rep(c(8000,3200,1280,512,204.8,81.92,32.77,0)),
                 OD=c(1.016,0.751,0.502,0.254,0.121,0.049,0.020,0))
curve<-drm(OD~Conc,
                   fct=LL.4(names=c("Slope", "Lower", "Upper", "ED50")),
                   data=dat)
plot(curve)

response<-c(CalData_12_18_20_withSampleIDR['Mean'])
DOSEx<-ED(curve,response,type="absolute",display=F)

用单列将 c 环绕在 data.frame 周围不会创建 vector。它是具有单个元素的 list,即

CalData_12_18_20_withSampleIDR['Mean']

仍然是具有单列的 data.frame

根据?ED

respLev - a numeric vector containing the response levels.

如果数据原本是 data.frame

response<- CalData_12_18_20_withSampleIDR$Mean
ED(curve, response, type = "absolute", display = FALSE)