[R] Maximum value of two columns

2006-05-10 Thread Dale Steele
Hello -- Given the 10x2 matrix below, my goal is to create a vector which contains the maximum of column 1 and column 2, or the only value if there is an NA in one column. I experimented with max.col without success. Thanks. --Dale tmax.m tmaxhme tmaxer [1,] 101.0 99.8 [2,]

Re: [R] Maximum value of two columns

2006-05-10 Thread jim holtman
apply(tmax.m, 1, max, na.rm=T) On 5/10/06, Dale Steele [EMAIL PROTECTED] wrote: Hello -- Given the 10x2 matrix below, my goal is to create a vector which contains the maximum of column 1 and column 2, or the only value if there is an NA in one column. I experimented with max.col without