Displaying 1 result from an estimated 1 matches for "startno".
2012 Oct 11
1
replacing ugly for loops
...is referred to as a sequence (henceforth "seq"). From
these files I am trying to extract particular subsets (tables) consisting of
a sets of columns. These tables are defined by three numbers (now in
columns in a data frame):
1. a file identifier (seq)
2. first column position numbers (startNo)
3. length of table (len)
so the columns to select for one triple would consist of
startNo:(startNo+length-1). I am trying to create for each sequence a
vector of all the column numbers for tables in that sequence.
Obviously I could do this with nested for loops,e.g..
> seq <- c(1,1,2,2)...