[R] Can't read xlsx file into R. Seem, Seem to have XLConnect loaded.
David Winsemius
dwinsemius at comcast.net
Thu May 10 03:44:37 CEST 2012
On May 9, 2012, at 6:38 PM, Mike Hilt wrote:
> I have spent hours on R in Windows 7. Just installed 2 days ago so
> the R
> package should be current. Currently I am using the RGui (64-bit)
> for Windows.
>
> I can not read an Excel file into R from my computer. Have hours on
> this.
> Completely crazy!!
>
snipped rant.
>
> So apparently "Oil Dly YTD1204 v01.xlsx" exists in my working
> directory.
>
> SO WHY DOES THE FOLLOWING BEHAVE THE WAY IT DOES?
>
>> OlPrcFl <- loadWorkbook(Oil Dly YTD1204 v01.xlsx, create = FALSE)
Most likely you need to quote that file argument. At the moment the
interpreter is probably trying to find an object named "Oil" in your
workspace. Try
OlPrcFl <- loadWorkbook("Oil Dly YTD1204 v01.xlsx", create = FALSE)
>
> Error: unexpected input in "OlPrcFl <- loadWorkbook("
>
> I can read an xlsx file in when I do:
>
>
>> OlPrcFl <- loadWorkbook(file.choose())
>
> That is not a real, long-term solution.
>
>
> Have same problem installing packages -- Can't get R to load a
> package when
> I specify a path.
Probably the same error, failing to quote when R expects to a
character object.
> Works when I use file.choose()
>
> [[alternative HTML version deleted]]
Sigh. I _know_ that gmail will allow you to post in plain text.
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list