Re: [R] Subsetting data systematically

2011-06-24 Thread gibberish
Thanks! From: Peter Alspach-2 [via R] [mailto:ml-node+3618799-1094957657-247...@n4.nabble.com] Sent: Wednesday, June 22, 2011 9:27 PM To: Bendik, Nathan Subject: Re: Subsetting data systematically Tena ko

Re: [R] Subsetting data systematically

2011-06-22 Thread Peter Alspach
Tena koe Nate You can use the fact that R recycles. If yourData is a dataframe, then (as examples): yourData[c(TRUE,FALSE),] will give you every second row, starting with the first. Similarly, yourData[c(FALSE,TRUE,FALSE),] will give every third row, starting with the second; and yourData[c(