I have data that looks like this:

start     end     value
1          4         2
5          8         1  
9         10        0


I want to transform the data so that it becomes:

startend     value
1               2
2               2
3               2
4               2
5               1
6               1
7               1
8               1
9               0
10             0

----
I've written a for loop that can do the transformation BUT I need to do this
on very large datasets (millions of rows).  Does anyone know of an R package
that has a function that can do this transformation?

Any help is much appreciated!

Thanks!
-- 
View this message in context: 
http://r.789695.n4.nabble.com/help-with-simple-but-massive-data-transformation-tp2989850p2989850.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to