[R] question on mean, sum

mokuram at sina.com mokuram at sina.com
Mon Nov 14 04:01:25 CET 2016


 Hi, 
I am working on functions such as sum(), mean() ... 
> sum(mtcars)[1] 13942.2> mean(mtcars)[1] NAWarning message:In mean.default(mtcars) : NA> sd(mtcars)Error in is.data.frame(x) : ()'double'
why got different reply?Is this a BUG for the current version of R?my version info:version.string R version 3.3.1 (2016-06-21)

Thank you very much for the help.
mokuram

	[[alternative HTML version deleted]]



More information about the R-help mailing list