[R] Excluding rows from a matrix - best option
José Ernesto Jardim
ernesto at ipimar.pt
Tue Aug 22 11:25:23 CEST 2000
José Ernesto Jardim wrote:
> I have a matrix (4 x 950) and I want to remove 3 rows, where the values
> from the first column are 713, 714 and 715. I can select the rows, one
> by one, with
> but I'm unable to (i) select the 3 rows at once, (ii) select the matrix
> excluding those rows.
> How can I do it ?
The best way I found after these messages and with your help was
(i) selecting diferent rows
mat[(mat$first==c(###, ###, ...)),]
(ii) excluding diferent rows
mat[!(mat$first==c(###, ###, ...)),]
Because there were so many diferent options I'm posting this as a 'best option'
for the problem.
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