[Rd] Is aggregate() function changing?

Kenneth Roy Cabrera Torres krcabrer at une.net.co
Tue Mar 24 05:44:09 CET 2009


Hi R developers and debian users:

Finally I found how to work with aggregate() function
on the last patched version fo R.

I you use this command it fails:
  
 aggregate(state.x77, list(Region = state.region), mean)

But if you modify it in this way, it works!:

 aggregate(state.x77, list(Region = state.region), function(x) mean(x) )

Is it necesary to change the example?

What is changing in aggregate() function?

Thank you for your attention.

Kenneth.
>sessionInfo()

R version 2.8.1 Patched (2009-03-18 r48193) 
x86_64-unknown-linux-gnu 

locale:
LC_CTYPE=es_CO.UTF-8;LC_NUMERIC=C;LC_TIME=es_CO.UTF-8;LC_COLLATE=es_CO.UTF-8;LC_MONETARY=C;LC_MESSAGES=es_CO.UTF-8;LC_PAPER=es_CO.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=es_CO.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base



More information about the R-devel mailing list