On 22/04/2010 11:07 AM, Vlatka Matkovic Puljic wrote:
Hi!

I have v1, v2 and v3 (data in v. ranges 1 to 4)

v1
   [1]   1   1   1   1 NaN   1   1   4   1   1   3
v2
   [1]   1   1   1   1   1   1   1   1   1   1   1
v3
   [1]   1   1   1   1   1   1   1   1   1   1   1

I want R to compare entries in v1,v2,v3 and in v4 to put largest value
(NA=0).
For example. first line v4 would be 1, but last line v4 would be 3.

What function should I use?


pmax.

Duncan Murdoch

______________________________________________
R-help@r-project.org 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.

Reply via email to