Message-ID: <391003F9.B4C44DB@univ-orleans.fr>
Date: 2000-05-03T10:48:26Z
From: nicolas baurin
Subject: :?alternative to loop
Hello to all R people,
for the application of a function to each column of a matrix (ex:
function sum()), i'd like to know if there is a simpler (and faster)
alternative to a loop like :
for (i in 1: ncol(m)){sum(m[i])}
Thanks in advance,
Cordialement,
--
Nicolas Baurin
Doctorant
Institut de Chimie Organique et Analytique, UPRES-A 6005
Universit? d'Orl?ans, BP 6759
45067 ORLEANS Cedex 2, France
Tel: (33+) 2 38 49 45 77
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._