[R] how to merge within range?

David Winsemius dwinsemius at comcast.net
Sat May 14 15:03:03 CEST 2011


On May 14, 2011, at 8:12 AM, René Mayer wrote:

> Hello,
> how can one merge

And what happened when you typed:

?merge

> two data frames when in the second data frame one column defines the  
> start values
> and another defines the end value of the to be merged range.
> data.frame.1
> time ...
> 13
> 24
> 35
> 46
> 55
> ...
> data.frame.2
> start end
> 24 37 ?h? ?
> ...
>
> should result in this
> 13 NA
> 24 ?h?
> 35 ?h?
> 46 NA
> 55
> ?

And _why_ would that be?


> thanks,
> René
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list