[R] Functions on matrix row level
Arndt, Ulrich, VF-VP
ulrich.arndt at vodafone.de
Mon Jan 28 16:06:41 CET 2002
Hi together,
I have some data in a matrix structure - say 1000 rows with 10 columns. And
I like to do some calculations (like max, avg or min) on row level.
The only solution I found so fare was using a loop like
for (i in 1:1000) {
max[i] <- max(matrix[I,])
}
It looks like that this is not very fast.
Does an other way exists?
Kind regards
Ulrich
---------------------------------------------------------
This Mail has been checked for Viruses
Attention: Encrypted mails can NOT be checked!
**
Diese Mail wurde auf Viren geprueft
Hinweis: Verschluesselte mails koennen NICHT auf Viren geprueft werden!
---------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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