hi, I practice R programing by the step in <<R In Action>>; 
when i test by function, i get error like these;
call for help!


dstats <- function(x){c(mean=mean(x), sd=sd(x))}
> by(mtcars[,c('mpg', 'hp')], mtcars$am, dstats)
 Show Traceback
 
 Rerun with Debug
 Error in is.data.frame(x) : 
  (list) object cannot be coerced to type 'double'



------------------
BestRegards
  
 Su Wenlong
 Phone:13408010439
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to