[R] help with aggregate()
Sam Steingold
sds at gnu.org
Tue Feb 15 20:26:25 CET 2011
> * Sam Steingold <fqf at tah.bet> [2011-02-14 18:42:40 -0500]:
>
> byFOO$Mean <- aggregate(all$Value, by = list(all$FOO), FUN = mean)$x;
this fails with
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In mean.default(X[[1L]], ...) :
argument is not numeric or logical: returning NA
2: In mean.default(X[[2L]], ...) :
argument is not numeric or logical: returning NA
3: In mean.default(X[[3L]], ...) :
argument is not numeric or logical: returning NA
4: In mean.default(X[[4L]], ...) :
argument is not numeric or logical: returning NA
5: In mean.default(X[[5L]], ...) :
argument is not numeric or logical: returning NA
note that there are absolutely no NAs in all$Value:
> all(!is.na(all$Value))
[1] TRUE
--
Sam Steingold (http://sds.podval.org/) on CentOS release 5.3 (Final)
http://iris.org.il http://www.memritv.org http://pmw.org.il
http://camera.org http://mideasttruth.com http://dhimmi.com
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))
More information about the R-help
mailing list