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")] : 量度数目不对