[R] Absolute path in gdata library

r ric.romoli at gmail.com
Wed Nov 7 23:58:49 CET 2012


Dear list, 
I have some .xls files that I need to read into R. I am able to do so
using read.xls in the gdata package, however the helper functions
sheetNames and sheetCount fail. This is the error:

Unable to open file '~/SharedFolder/MyData/mydata.xls'.
Warning: running command ''/usr/bin/perl'
'/usr/local/lib/R/site-library/gdata/perl/sheetCount.pl'
'~/SharedFolder/MyData/mydata.xls'' had status 2

Googling I found that the problem is caused by the use of the absolute
path ("~/SharedFolder/MyData/") instead of
"/home/r/SharedFolder/MyData/". I use the absolute path because I work
from different computer connected to a shared folder. 

This is the discussion I found:
http://stackoverflow.com/questions/11737906/path-specification-when-using-the-r-package-gdata

Is there a way to solve this problem??

Best
Riccardo



More information about the R-help mailing list