請(qǐng)問(wèn)這個(gè)代碼為什么運(yùn)行不出來(lái)呢?
s <- airquality
split(s,s$Month)
sapply(s, function(x),colMeans(x[,c("Ozone","Temp")]))
運(yùn)行后提示:
> sapply(s, function(x) colMeans(x[,c("Ozone","Temp")]))
Error in x[, c("Ozone", "Temp")] : 量度數(shù)目不對(duì)