[R] hwo can i get a vector that...

Hong Ooi Hong.Ooi at iag.com.au
Thu Mar 8 00:23:52 CET 2007


_______________________________________________________________________________________


max.col sounds like what you're after.


-- 
Hong Ooi
Senior Research Analyst, IAG Limited
388 George St, Sydney NSW 2000
+61 (2) 9292 1566
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of bunny , lautloscrew.com
Sent: Thursday, 8 March 2007 9:12 AM
To: r-help at stat.math.ethz.ch
Subject: [R] hwo can i get a vector that...

dear all,

how can i get a vector that shows the number of the column of matrix  
that contains the maximum of the row ??
can´t believe in need a loop for this...

i have a  100 x 3 matrix and want to get a 100 x 1 vector with values  
1,2,3 .

there must be a simple solution. i just cannot find it. i think am  
searching on the wrong end.

thx for help in advance.

m.

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

_______________________________________________________________________________________

The information transmitted in this message and its attachme...{{dropped}}



More information about the R-help mailing list