[R] Matrix manipulation
tim.calkins at gmail.com
Tue Oct 23 00:27:03 CEST 2007
use the '-' feature.
>mat <- matrix(rnorm(100), nrow = 10)
#snip the second row
#snip the third column
#snip rows 5 and 7
On 10/23/07, yiferic at berkeley.edu <yiferic at berkeley.edu> wrote:
> Hi everyone,
> suppose I have a 2D matrix, is there a command to snip out a specific
> row/column and then remerge the remaining columns/rows back into a
> contiguous matrix? I will need to repeat this operation quite a
> bit(reverse selection).
> Thanks for any insights you can offer.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
0406 753 997
More information about the R-help