On Mon, Oct 11, 2010 at 10:16 AM, clee <cheel...@gmail.com> wrote:
>
> 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?

A very similar question was just asked recently. See this:

https://stat.ethz.ch/pipermail/r-help/2010-October/255791.html


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.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