search for: gagu2

Displaying 1 result from an estimated 1 matches for "gagu2".

Did you mean: gague
2006 Dec 26
2
sequential row selection in dataframe
Dear all; I'm wondering if there is any 'efficient' approach for selecting a sample of 'every nth rows' from a dataframe. For example, let's use the dataframe GAGurine in MASS library: > length(GAGurine[,1]) [1] 314 # select an 75% of the dataset, i.e. = 236 rows, every 2 rows starting from row 1 > test<-GAGurine[seq(1,314,2),] > length(test[,1]) [1] 157 #