search for: baffin

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

Did you mean: bafin
2012 Jan 10
2
short-hand to avoid use of length() in subsetting vectors?
...'m seeking a short-hand for referring to the length of vector one is trying to index. E.g., for a data.frame, say, > test.frame <-data.frame(matrix(c(1:100),ncol=10,nrow=10,byrow=T)) > names(test.frame) <- names(islands)[1:10] is there a short-hand for subsetting > test.frame$Baffin[1:(length(test.frame$Baffin)-3)] [1] 6 16 26 36 46 56 66 > > that would allow one to avoid the "(length(some.dataframe$variable)-offset)"? I was thinking something paralleling the use of negative indices in [?] might exist with seq(from,to), e.g. for the above > test.frame$...