Re: [R] partitioning vectors of intervals

2008-09-27 Thread jim holtman
Will this do it for you: > set.seed(1) > coarse <- runif(5,0,100) > coarse <- cbind(coarse, coarse + runif(5,1,10)) > coarse <- round(coarse,3) > fine <- runif(100,0,100) > fine <- cbind(fine, fine + runif(100,0,1)) > result <- lapply(seq(nrow(coarse)), function(.row){ + list(coarse[.row,], wh

[R] partitioning vectors of intervals

2008-09-27 Thread Alexy Khrabrov
I have two pairs of time intervals: coarse- and fine-grained. They're components of their respective dataframes, looking like, coarse:endtimestarttime 1t1_end t1_start 2 t2_end t2_start ... fine: is the same, except that i