Skip to content
Prev 305790 / 398506 Next

extracting column at regular intervals starting from different columns

Try:

x <- 1:444
start<-2
# [1]   2  39  76 113 150 187 224 261 298 335 372 409
start<-30
x[c(rep(FALSE,start-1),TRUE, rep(FALSE, 36-start+1))]
# [1]  30  67 104 141 178 215 252 289 326 363 400 437
start<-37
x[c(rep(FALSE,start-1),TRUE, rep(FALSE, 36-start+1))]
# [1]  37  74 111 148 185 222 259 296 333 370 407 444



Clint Bowman			INTERNET:	clint at ecy.wa.gov
Air Quality Modeler		INTERNET:	clint at math.utah.edu
Department of Ecology		VOICE:		(360) 407-6815
PO Box 47600			FAX:		(360) 407-7534
Olympia, WA 98504-7600

         USPS:           PO Box 47600, Olympia, WA 98504-7600
         Parcels:        300 Desmond Drive, Lacey, WA 98503-1274
On Tue, 18 Sep 2012, eliza botto wrote: