[R] two questions
rwehrens at sci.kun.nl
Mon Apr 15 15:13:04 CEST 2002
On Monday 15 April 2002 14:54, Ambrosini Alessandro wrote:
> The first: if I have a vector as (1,1,3,2,1,1), which is the command that
> gives all the positions of the min value? From the vector of the example a
> would like to obtain a new vector as (1,2,5,6) that give me all the
> positions of the minimum value 1.
> The second: if I have a matrix "A" and I want to obtain a new matrix
> deleting a column or a row of A, what have I to do?
> Thank you.
A[,-1] and A[-1,] give you matrix A without the first column or row,
Dept. of Chemometrics
University of Nijmegen Email: rwehrens at sci.kun.nl
Toernooiveld 1 http://www-cac.sci.kun.nl/cac/
6525 ED Nijmegen Tel: +31 24 365 2053
The Netherlands Fax: +31 24 365 2653
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help