[BioC] How to do a Vlookup-type function using a value range
James W. MacDonald
jmacdon at uw.edu
Tue May 6 22:06:49 CEST 2014
Hi Elena,
Why does 14 return c?
Best,
Jim
On Tuesday, May 06, 2014 3:34:41 PM, Elena Sorokin wrote:
> I have two data frames as input:
>
>> small Position
> 1 6
> 2 14
> 3 1
>
>
>> lookup_table Start Stop Value
> 1 1 5 a
> 2 6 10 b
> 3 11 15 c
>
> And I want the following output:
>
>> outcome Position Value
> 1 6 b
> 2 14 c
> 3 1 a
>
> What is some R code that I can write to accomplish this task?
>
> Thank you,
>
> Elena
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099
More information about the Bioconductor
mailing list