[R] Reading data from xls..........please help

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Jun 16 21:27:24 CEST 2010


On Wed, Jun 16, 2010 at 7:29 PM, Christofer Bogaso
<bogaso.christofer at gmail.com> wrote:
> Can anyone help me how to read xls file into R. I have tried following
>
> library(gdata)
> xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls')
> read.xls(xlsfile)
>
> I got following error:
> Converting xls file to csv file... Error in system(cmd, intern = !verbose) :
> perl not found
> Error in file.exists(tfn) : invalid 'file' argument
>
> Question *1) What is the way to get it working?*

 Works for me on an Ubuntu 9.10 with R 2.10.1, so swapping your OS and
R version to that will get it working... What OS/R are you on?

 Note it says 'perl not found'. That's because it hasn't found perl.
Do you have perl on your system? Do you need to specify the path to
perl, as in the examples for Windows in help(read.xls)?

Barry



More information about the R-help mailing list