[R] Removing Rows
Juan Pablo Romero
jpablo.romero at gmail.com
Tue Nov 22 01:42:25 CET 2005
try this: (if d is the data.frame)
1)
d[ (1:217)[1:217 %% 10 == 0], ]
2)
d[ (1:217)[1:217 %% 10 != 0], ]
2005/11/21, mark salsburg <mark.salsburg at gmail.com>:
> 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]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list