Skip to content
Prev 167272 / 398503 Next

Efficiency challenge: MANY subsets

Thanks. Very elegant, but doesn't solve the problem of the outer "for" loop, 
since I now would rewrite the code like so:

fragments <- list()
for(iN in seq(length(sequences))){
  cat(paste(iN,"\n"))
  fragments[[iN]] <- 
    lapply(indexes[[1]], function(g)sequences[[1]][do.call(seq, as.list(g))])
}

still very slow for length(sequences) ~ 7000.

Joh
On Friday 16 January 2009 14:23:47 Henrique Dallazuanna wrote:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090116/cc294606/attachment-0002.bin>