[R] Error with package xlsx
dwinsemius at comcast.net
Sun Jul 3 15:15:51 CEST 2011
On Jul 3, 2011, at 8:24 AM, David Winsemius wrote:
> On Jul 3, 2011, at 12:51 AM, Sergio Mira wrote:
>> Could anyone help me with this error? I have no idea what that is
>>> file <- system.file("DADOSCASUMCCORMICK.xlsx", package = "xlsx")
>> > data <- read.xlsx(file, 1)
>> Error in .jnew("java/io/FileInputStream", file) :
>> java.io.FileNotFoundException: (No such file or directory)
> Is there really a file by that name in your package directory? When
> I do that on my machine, file is "" after the first command, which
> is the documented behavior when the file cannot be found.
> My guess is that you need to provide a path and append it to the
> file name before sending a request to system.file. I'm also
> suggestinging that you don't really want to be saving you work files
> in system directories and you should be using getwd() and paste()-
> ing to your file name.
On re-reading this I see that it was unclear that I was suggesting
_not_ using system.file for this task. Just use getwd() and paste to
construct a path/file.ext.
>> || ------
>> || Sergio Henrique Bento de Mira
>> || Computer Science | Class of 2008/2
> David Winsemius, MD
> West Hartford, CT
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help