[R] What is the matrix version of min()

mel mel at altk.com
Wed Sep 6 10:48:58 CEST 2006


Tong Wang a écrit :

> Hi, 
>     Is there a function which operates on a matrix and return a vector of min/max of each rol/col ?
> say,  X=  2,  1
>                 3,  4 
> min.col(X)=c(2,1)
> thanks a lot.
> tong

see ?pmin, which.min, which.max, max.col
hih



More information about the R-help mailing list