[R-SIG-Mac] Importing Excel files

peter dalgaard pdalgd at gmail.com
Tue Jun 19 11:36:04 CEST 2012


On Jun 19, 2012, at 01:16 , Colstat wrote:

> I think the error says it
> "package Œgdata‚ was built under R version 2.15.1 "
> and you have R 2.5.10.
> 
> Update your R first, let me know if it doesn't work.

2.15.1 is announced for Friday... I think it's a bit of a glitch that CRAN is already automatically providing packages for it, but you are of course more than welcome to test the prereleases (from http://R.research.att.com/).

I suppose that this comes about from building packages with R-patched, which transitions directly into the prereleases for the next version. 


> 
> On Mon, Jun 18, 2012 at 5:28 PM, Victoria Xiao <victoriayxiao at gmail.com>wrote:
> 
>> Exactly. Every time I try to load it from the package manager, the check
>> mark in the check box vanishes and the status goes back to 'not loaded'. At
>> the same time, I get this error message:
>> 
>> Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) :
>> there is no package called Œgtools‚
>> In addition: Warning message:
>> package Œgdata‚ was built under R version 2.15.1
>> Error: package/namespace load failed for Œgdata‚
>> It's very perplexing. Would uninstalling and reinstalling gdata help at
>> all?
>> 
>> Thanks again.
>> 
>> On Mon, Jun 18, 2012 at 2:23 PM, Colstat <colstat at gmail.com> wrote:
>> 
>>> Looking at your output, and if you are using package 'gdata'.
>>> Then under "Other attached packages" of your output
>>> 
>>> you don't have,
>>>> gdata_2.6.2
>>> 
>>> Are you sure you have loaded the package correctly?  It doesn't look like
>>> it.
>>> 
>>> 
>>> 
>>> On Mon, Jun 18, 2012 at 5:15 PM, Victoria Xiao <victoriayxiao at gmail.com>wrote:
>>> 
>>>> 
>>>> 
>>>> On Mon, Jun 18, 2012 at 2:13 PM, Colstat <colstat at gmail.com> wrote:
>>>> 
>>>>> Hi Victor,
>>>>> could you type sessionInfo() in R terminal and paste here what you got?
>>>>> 
>>>>> On Mon, Jun 18, 2012 at 5:06 PM, Victoria Xiao <victoriayxiao at gmail.com
>>>>>> wrote:
>>>>> 
>>>>>> Hi all,
>>>>>> 
>>>>>> I'm trying to figure out how to import Excel files into R. I'm running
>>>>>> Mac
>>>>>> 10.6, and so far I've tried the xlsx and gdata packages; both gave
>>>>>> error
>>>>>> messages.
>>>>>> 
>>>>>> For the xlsx package, here is what I got:
>>>>>> 
>>>>>>> library(xlsx)
>>>>>>> project.source = "/Users/vicki/Desktop/R/test/kdReport.xls" #change
>>>>>> the
>>>>>> path and file name here
>>>>>>> PIGF.elisa.dat = read.xlsx (file=project.source, 1, header=T)
>>>>>> Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,
>>>>>> : java.lang.IllegalArgumentException: Your InputStream was neither an
>>>>>> OLE2
>>>>>> stream, nor an OOXML stream
>>>>>> 
>>>>>> For the gdata package, it said that gtools was required; when gtools
>>>>>> package was attempted to load, this error message resulted:
>>>>>> 
>>>>>> Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) :
>>>>>> there is no package called Œgtools‚
>>>>>> In addition: Warning message:
>>>>>> package Œgdata‚ was built under R version 2.15.1
>>>>>> Error: package/namespace load failed for Œgdata‚
>>>>>> 
>>>>>> Does anyone know how to resolve either of these error messages, or if
>>>>>> there
>>>>>> are better packages to interact with Excel files in R on a Mac? Thanks
>>>>>> so
>>>>>> much.
>>>>>> 
>>>>>> Sincerely,
>>>>>> Victoria Xiao
>>>>>> 
>>>>>>       [[alternative HTML version deleted]]
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> R-SIG-Mac mailing list
>>>>>> R-SIG-Mac at r-project.org
>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>>> 
>>>>>> 
>>>>> 
>>>>> sessionInfo()
>>>> R version 2.15.0 (2012-03-30)
>>>> Platform: i386-apple-darwin9.8.0/i386 (32-bit)
>>>> 
>>>> locale:
>>>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>>>> 
>>>> attached base packages:
>>>> [1] splines   stats     graphics  grDevices utils     datasets  methods
>>>> [8] base
>>>> 
>>>> other attached packages:
>>>> [1] epicalc_2.14.1.6 xlsx_0.4.2       xlsxjars_0.4.0   rJava_0.9-3
>>>> [5] rj_1.1.0-4       nnet_7.3-1       MASS_7.3-17      survival_2.36-12
>>>> [9] foreign_0.8-49
>>>> 
>>>> loaded via a namespace (and not attached):
>>>> [1] tools_2.15.0
>>>> 
>>> 
>>> 
>> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-SIG-Mac mailing list