Hi,
Try:
f<-c(1,2)
d[-seq_along(f),]
# a b
#[1,] 3 8
#[2,] 4 9
#[3,] 5 10
A.K.
- Original Message -
From: Andras Farkas
To: r-help@r-project.org
Cc:
Sent: Wednesday, March 20, 2013 5:53 PM
Subject: [R] remove specific number of rows from a matrix
Dear All,
sorry, got st
Hi Andras,
what about:
> d[-(1:length(f)), ]
a b
[1,] 3 8
[2,] 4 9
[3,] 5 10
Best,
Gergely
On 20 March 2013 22:53, Andras Farkas wrote:
> Dear All,
>
> sorry, got stuck again on the following: let us say we have:
>
> a <-c(1:5)
> b <-c(6:10)
> d <-cbind(a,b)
>
>
> from d I would like
Dear All,
sorry, got stuck again on the following: let us say we have:
a <-c(1:5)
b <-c(6:10)
d <-cbind(a,b)
from d I would like to remove total number of rows based on the length of f. So
if:
f <-c(1)
my result is working great with the following solution:
d[-length(f),]
so I get:
3 matches
Mail list logo