[R] apply()

Ko-Kang@xtra.co.nz Ko-Kang at xtra.co.nz
Fri Mar 16 09:55:40 CET 2001


Hi,

I input this command on a data matrix:
 >   apply( traffic, 2, function(z){z-mean(z)})

and got the following error messages:
  Error in sum(..., na.rm = na.rm) : invalid "mode" of argument

Can anyone tell me what is wrong here?

Running R1.2.2 on Windows ME.

Cheers,

Kevin

-------------------------------------------------
Ko-Kang Kevin Wang
Statistical Analysis Division Leader
Software Developers' Klub
University of Auckland
New Zealand

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list