Am 30.09.2011 11:30, schrieb Alaios:
Dear all,
I have a numeric vector that contains indices.
I also have two matrices of [1,m] dimension and of [m,n] dimension.
I want for every indexto remove the current element from the [1,m] vector an
the row from the [m,n] matrix.
How I can do that efficie
Try this. As you did not supply a reproducible example my code is untested:
1.m.vector[index.vector] <- NULL
or
new.1.m.vector <- 1.m.vector[- index.vector]
Someting equivalent is possible for the matrix.
HTH
Jannis
On 09/30/2011 11:30 AM, Alaios wrote:
Dear all,
I have a numeric vector th
Dear all,
I have a numeric vector that contains indices.
I also have two matrices of [1,m] dimension and of [m,n] dimension.
I want for every indexto remove the current element from the [1,m] vector an
the row from the [m,n] matrix.
How I can do that efficiently in R? So to say not have a for loo
3 matches
Mail list logo