Thank you Philipp, it is very useful! How come I haven't figured it out
myself I dont know...
Have a pleasant weekend!
Laszlo
--
View this message in context:
http://r.789695.n4.nabble.com/creating-additional-column-tp3341224p3348552.html
Sent from the R help mailing list archive at Nabble.com.
Hello everybody,
I have a little problem in good old R. It is basically the following.
I have this small database with 3 rows and the following columns:
d1,
d2,
d3 and
Highest d value - which selects the highest value from d1, d2, d3 in each row.
d1 d2 d3
Hi!
max.col does what you want. Example:
dat - data.frame(a=rnorm(20),b=rnorm(20),c=rnorm(20))
dat
a b c
1 1.17910304 -0.56951219 -0.2243664
2 -1.43840866 -0.99013855 -0.1613536
3 1.08515152 -0.77975274 0.3734530
4 -0.92154605 -0.20318367
3 matches
Mail list logo