[R] VLOOKUP in R - tried everything.

2011-06-03 Thread bjmjarrett
in context: http://r.789695.n4.nabble.com/VLOOKUP-in-R-tried-everything-tp3571107p3571107.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

Re: [R] VLOOKUP in R - tried everything.

2011-06-03 Thread peter dalgaard
will be greatly appreciated. -- View this message in context: http://r.789695.n4.nabble.com/VLOOKUP-in-R-tried-everything-tp3571107p3571107.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https

Re: [R] VLOOKUP in R - tried everything.

2011-06-03 Thread David Winsemius
which order they are in. Thanks for reading all the way through - I wanted all the information I felt you might need to help me in it. Any help will be greatly appreciated. -- View this message in context: http://r.789695.n4.nabble.com/VLOOKUP-in-R-tried-everything-tp3571107p3571107.html Sent

Re: [R] VLOOKUP in R - tried everything.

2011-06-03 Thread Ethan Brown
as it doesn't matter which order they are in. Thanks for reading all the way through - I wanted all the information I felt you might need to help me in it. Any help will be greatly appreciated. -- View this message in context: http://r.789695.n4.nabble.com/VLOOKUP-in-R-tried-everything

Re: [R] vlookup in R?

2010-05-28 Thread Dennis Murphy
Hi: I think the idea here is to use the cdf intervals as the lookup table for rand (the entire vector) and then return the seq value corresponding to the found interval. Combining the ideas from Jim Holtman (use findInterval()) and Josh Wiley, what worked for me was to split the OP's data into

[R] vlookup in R?

2010-05-27 Thread Roslina Zakaria
Hi R-users,   I would like to search for the values of seq that match my rand values.  In excel I will use =VLOOKUP(G2,$E$2:$F$32,2).  For example, for rand=.262 it will give me approximately seq=120 and rand=0.964293344, seq=460 and etc.   E   F G cdf         seq   rand 0.00E+00   

Re: [R] vlookup in R?

2010-05-27 Thread Joshua Wiley
Hello, I'm trying to figure out exactly what you want. You have data with three columns (cdf, seq, and rand). You want to take a number in column rand, find the closest match to it in cdf and return the value of seq for the same row as the closest match in cdf? Since you did not fix (i.e., use

Re: [R] vlookup in R?

2010-05-27 Thread jim holtman
?findInterval On Thu, May 27, 2010 at 9:20 PM, Roslina Zakaria zrosl...@yahoo.com wrote: Hi R-users, I would like to search for the values of seq that match my rand values.  In excel I will use =VLOOKUP(G2,$E$2:$F$32,2).  For example, for rand=.262 it will give me approximately seq=120 and

Re: [R] vlookup in R?

2010-05-27 Thread Joshua Wiley
Does this do what you are looking for? ### #Create data based off what you provided datasamp - structure(list(cdf = c(0, 0.00156, 0.0155, 0.053, 0.116, 0.197, 0.288, 0.38, 0.468, 0.548, 0.618, 0.679, 0.732, 0.776, 0.813, 0.844, 0.87, 0.892, 0.91, 0.926, 0.938, 0.949,

[R] vlookup in R

2008-03-24 Thread Sachin J
Hi, Is there are function similar to excel vlookup in R. Please let me know. Thanks, Sachin [[alternative HTML version deleted]] __ R-help@r

Re: [R] vlookup in R

2008-03-24 Thread Henrique Dallazuanna
I think that merge is what you want: set.seed(24032008) x - data.frame(ID=sample(10), Value=rnorm(10)) idx - sample(5) merge(idx, x, by.x=1, by.y=1) On 24/03/2008, Sachin J [EMAIL PROTECTED] wrote: Hi, Is there are function similar to excel vlookup in R. Please let me know. Thanks

Re: [R] vlookup in R

2008-03-24 Thread jim holtman
?findInterval On 3/24/08, Sachin J [EMAIL PROTECTED] wrote: Hi, Is there are function similar to excel vlookup in R. Please let me know. Thanks, Sachin [[alternative HTML version deleted

Re: [R] vlookup in R

2008-03-24 Thread David Winsemius
Sachin J [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Is there are function similar to excel vlookup in R. Please let me know. Caveat: definition of VLOOKUP done from memory and by checking OO.o Calc function of same name. (Don't have Excel on this machine.) VLOOKUP looks up

Re: [R] vlookup in R

2008-03-24 Thread Sachin J
:41:52 AM Subject: Re: [R] vlookup in R I think that merge is what you want: set.seed(24032008) x - data.frame(ID=sample(10), Value=rnorm(10)) idx - sample(5) merge(idx, x, by.x=1, by.y=1) On 24/03/2008, Sachin J [EMAIL PROTECTED] wrote: Hi, Is there are function similar to excel vlookup in R

Re: [R] vlookup in R

2008-03-24 Thread Henrik Bengtsson
: Monday, March 24, 2008 10:41:52 AM Subject: Re: [R] vlookup in R I think that merge is what you want: set.seed(24032008) x - data.frame(ID=sample(10), Value=rnorm(10)) idx - sample(5) merge(idx, x, by.x=1, by.y=1) On 24/03/2008, Sachin J [EMAIL PROTECTED] wrote: Hi

Re: [R] vlookup in R

2008-03-24 Thread jim holtman
in advance for your help. - Original Message From: Henrique Dallazuanna [EMAIL PROTECTED] To: Sachin J [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Monday, March 24, 2008 10:41:52 AM Subject: Re: [R] vlookup in R I think that merge is what you want: set.seed(24032008) x

Re: [R] vlookup in R

2008-03-24 Thread Sachin J
, 2008 12:43:42 PM Subject: Re: [R] vlookup in R # Setup the translation map transMap - c(A=R, B=R, C=R, D=B, F=B); # The input data v3 - c(A, C, D, F, A, C, B, B, B, B, A, D); # The translated data v4 - transMap[v3]; df2 - data.frame(V3=v3, V4=v4); I recommend you to read 'An Introduction to R