[R] help with simple but massive data transformation

Gabor Grothendieck ggrothendieck at gmail.com
Mon Oct 11 16:48:42 CEST 2010


On Mon, Oct 11, 2010 at 10:16 AM, clee <cheelee7 at 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



More information about the R-help mailing list