[R] Error with package xlsx
David Winsemius
dwinsemius at comcast.net
Sun Jul 3 14:24:02 CEST 2011
On Jul 3, 2011, at 12:51 AM, Sergio Mira wrote:
> Hi,
>
> Could anyone help me with this error? I have no idea what that is
> about...
>
>> 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.
>
> Thanks!
>
> --
> Regards,
> || ------
> || Sergio Henrique Bento de Mira
> || Computer Science | Class of 2008/2
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list