Hi

use
selection <- seq(10, final length, 10) 
or
selection <- (1:n)*10

and

mydf[selection,]
mydf[-selection,]

HTH
Petr


On 21 Nov 2005 at 15:37, mark salsburg wrote:

Date sent:              Mon, 21 Nov 2005 15:37:28 -0500
From:                   mark salsburg <[EMAIL PROTECTED]>
To:                     [email protected], [email protected]
Subject:                [R] Removing Rows

> I have a data frame with the following dimensions 217 x 5
> 
> I want to create two data frames from the original.
> 
> 1) One containing every tenth row of the original data frame
> 2) Other containing the rest of the rows.
> 
> How do I do this? I've tried subset() and calling the index.
> 
> thank you in advance,
> 
>  [[alternative HTML version deleted]]
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to