see ?apply min.row <- apply(X, 1, min) min.col <- apply(X, 2, min)
JeeBee On Wed, 06 Sep 2006 01:37:22 -0700, Tong Wang wrote: > 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 > > ______________________________________________ R-help@stat.math.ethz.ch > 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. ______________________________________________ R-help@stat.math.ethz.ch 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.