[R] Read a Google Spreadsheet?

Joshua Wiley jwiley.psych at gmail.com
Thu Sep 5 03:50:30 CEST 2013


Hi Spencer,

It really is not very hard, and I have never had issue with it:

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Just download the x86 and x64 versions for your OS and install.  Worst
case, you need to add the directory to the PATH variable in Windows.

I do this regularly so I can use/test either version of R.

Cheers,

Josh

P.S. Emacs + ESS allows for different versions of R and it is not too
difficult to use the 64 or 32 bit version... M-x
R-version-architecture


On Wed, Sep 4, 2013 at 6:36 PM, Spencer Graves
<spencer.graves at structuremonitoring.com> wrote:
> On 9/4/2013 6:09 PM, Ista Zahn wrote:
>>
>> Hi Spencer,
>>
>> Why don't you want to install 64bit Java?
>
>
>
>       That may be a reasonable approach.
>
>
>       I may have Java confused with something else, but I remember hearing
> that it was difficult or unwise to try to install both 32- and 64-bit
> versions of something like Java or Java Script on the same Windows operating
> system.  If I need to uninstall 32-bit Java to install 64-bit, who knows
> what else I could break.  I'm a statistician, not an information
> technologist:  If I spend more time playing with Java, I'll have less time
> for other things I want to do.
>
>
>       Thanks for the reply.
>       Spencer
>>
>>
>> On Wed, Sep 4, 2013 at 6:12 PM, Spencer Graves
>> <spencer.graves at structuremonitoring.com> wrote:
>>>
>>> Hello, All:
>>>
>>>
>>> What do you recommend for reading a Google Spreadsheet into R? I didn't
>>> find
>>> anything useful using library(sos); findFn('google spreadsheet').
>>>
>>>
>>> I can solve the problem by downloading the file either as *.ods or *.xlsx
>>> format, then opening it and saving it as *.xls, then using
>>> read.xls{gdata}.
>>>
>>>
>>> Alternatives I haven't tried use read.xlsx{xlsx} and
>>> readWorksheetFromFile{XLConnect} with 32-bit R. Neither of these work for
>>> me
>>> with 64-bit R, because they can't find an appropriate rJava on my
>>> computer;
>>> see below. (I've been using 64-bit R with Emacs, so switching to 32-bit R
>>> is
>>> not completely trivial.) Similarly, read.gnumeric.sheet{gnumeric}
>>> requires
>>> the "external program, ssconvert", which seems not to be available on my
>>> computer or installed for 64-bit R.
>>>
>>>
>>> What do you suggest? Avoid 64-bit R unless I really need it? That seems
>>> to
>>> be the message I'm getting from this. (The writeFindFn2xls{sos} also
>>> works
>>> in 32-bit R but fails in 64-bit apparently for the same reason.)
>>>
>>>
>>> Thanks,
>>> Spencer
>>>
>>>
>>>> library(xlsx)
>>>
>>> Loading required package: xlsxjars
>>> Loading required package: rJava
>>> Error : .onLoad failed in loadNamespace() for 'rJava', details:
>>> call: fun(libname, pkgname)
>>> error: No CurrentVersion entry in Software/JavaSoft registry! Try
>>> re-installing Java and make sure R and Java have matching architectures.
>>> Error: package ‘rJava’ could not be loaded
>>>>
>>>> library(XLConnect)
>>>
>>> Loading required package: rJava
>>> Error : .onLoad failed in loadNamespace() for 'rJava', details:
>>> call: fun(libname, pkgname)
>>> error: No CurrentVersion entry in Software/JavaSoft registry! Try
>>> re-installing Java and make sure R and Java have matching architectures.
>>> Error: package ‘rJava’ could not be loaded
>>>>
>>>> sessionInfo()
>>>
>>> R version 3.0.1 (2013-05-16)
>>> Platform: x86_64-w64-mingw32/x64 (64-bit)
>>>
>>> locale:
>>> [1] LC_COLLATE=English_United States.1252
>>> [2] LC_CTYPE=English_United States.1252
>>> [3] LC_MONETARY=English_United States.1252
>>> [4] LC_NUMERIC=C
>>> [5] LC_TIME=English_United States.1252
>>>
>>> attached base packages:
>>> [1] stats graphics grDevices utils datasets methods base
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://joshuawiley.com/
Senior Analyst - Elkhart Group Ltd.
http://elkhartgroup.com



More information about the R-help mailing list