Dale Steele 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
> success. Thanks. --Dale
>
> > > tmax.m
> tmaxhme tm
apply(tmax.m, 2, max)
Dale Steele 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
> success. Thanks. --Dale
>
> > > tmax.
Try this:
pmax(tmax.m[,1], tmax.m[,2], na.rm = TRUE)
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 experimente
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