[R] R and Excel

Bonfigli Sandro bonfigli at inmi.it
Mon Jul 23 10:48:47 CEST 2007


> Dear all,
> Someone knows what's the command in R corresponding to the "vlookup" in
> Excel?
> Thank you in advance.
> Claudia
> ______________________________________________
> R-help a stat.math.ethz.ch 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.

As far as I discovered from a quick google query the Excel
command you cite selects some values from a table according 
to some conditions.
So if you have a data frame called example you could do 
something like 
example[example$var1>5,] 
Perhaps you need something like
example[example$var1>5,2:5]
or 
example[example$var1>5,]$var2.

Anyway you should follow the advice you'll find at the end of 
the message:
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
... or at least a good example of what you would like to obtain!

You'll find a lot of informations on the manipulation of data frames
in the manuals.
go to http://www.r-project.org/, select "manuals", go to the 
"Contributed Documentation". You'll find various manuals,
also ones in italian.

Ciao
  Sandro



More information about the R-help mailing list