请问这个代码为什么运行不出来呢?
s <- airquality
split(s,s$Month)
sapply(s, function(x),colMeans(x[,c("Ozone","Temp")]))
运行后提示:
> sapply(s, function(x) colMeans(x[,c("Ozone","Temp")]))
Error in x[, c("Ozone", "Temp")] : 量度数目不对
s <- airquality
split(s,s$Month)
sapply(s, function(x),colMeans(x[,c("Ozone","Temp")]))
运行后提示:
> sapply(s, function(x) colMeans(x[,c("Ozone","Temp")]))
Error in x[, c("Ozone", "Temp")] : 量度数目不对
2021-01-23
举报