[R] data extraction

Chuck Cleland ccleland at optonline.net
Fri Jun 30 13:52:52 CEST 2006


mydf[seq(10,20000,10),]

yohannes alazar wrote:
> Dear mailing list I have a data that have 20,000 rows and 20 columns. Io
> wonted to extract the 10th row only. Example the 10th, 20th, 30th 40th…..20000
> th. can you please help me how do I do that.Than kyou.
> Example is below.
> Inpute:
> AG GG GG AG
> CC CC CC CC
> CT CC CT CT
> GG GG GG GG
> CC CC CC CC
> GG GG GG GG
> CC CC CC CC
> GG CG CG GG
> GG GG GG GG
> *CC CC CC CC*
> AA AG AG AA
> AA AA AA AA
> GG AG AG GG
> GG AG AG GG
> GG GG GG GG
> TT TT TT TT
> AA AG AG AA
> CT CC CT TT
> AG AA AG GG
> *AA AA AG AG*
> AA AA AA AA
> CC CC CC CG
> GG GG GG AG
> CT TT CT CT
> AT AA AT AT
> GG GG GG AG
> CG CC CG GG
> GG GG GG AG
> CC CC CC CT
> GG GG GG GG
> *GG GG AG AG
> *CC CC CC CT
> TT TT TT CT
> AG GG AG AG
> GG GG GG GG
> AG AG AA AA
> AG GG AG AA
> CT TT CT CT
> CT CT CC CT
> *AC CC AC AC*
> 
> output
> *CC CC CC CC
> AA AA AG AG
> GG GG GG GG
> AC CC AC AC*
> 
> thankyou a lot inadvance!
> 
> 	[[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

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894



More information about the R-help mailing list