我目前正在使用预装的数据集CO2,使用subset()函数。我需要得到最普通的冷冻疗法,但我在写它的时候有问题。我尝试过像mean(subset(data,Treatment=chilled))这样的代码,但这肯定是错误的。
我尝试过的一些解决方案是
mean(subset(treatment,chilled))
subset(treatment,chilled)
chilled <- subset(mean,treatment=chilled)所有人都得到了错误的答案。
发布于 2022-11-02 15:11:41
由于uptake变量是最明显的响应变量,您可能希望类似于
mean(subset(CO2, Treatment == "chilled")$uptake)您需要在这里使用("chilled")
$或[[))
https://stackoverflow.com/questions/74291367
复制相似问题