search for: tmpfragment

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

Did you mean: tmpfragments
2009 Jan 16
2
Efficiency challenge: MANY subsets
...t I now want to do is to subset each entry in "sequences" (sequences[[1]]) with all ranges in the corresponding low level list in "indexes" (indexes[[1]]). Here is what I came up with. fragments <- list() for(iN in seq(length(sequences))){ cat(paste(iN,"\n")) tmpFragments <- sapply( indexes[[iN]], function(x){ sequences[[iN]][seq.int(x[1],x[2])] } ) fragments[[iN]] <- tmpFragments } This works fine, but "sequences" contains thousands of entries and the corresponding "indexes" are sometimes hundreds of ranges long, s...