[R] Unable to require installed package

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Feb 1 10:08:34 CET 2011



1. You need R version >= R-2.12.0 on Windows in order to use a package 
that is compiled under R >= 2.12.0.
2. winbuilder gave some reports. That may have said if and why your 
package could not be compiled under 64-bit R for some reason.
3. If you have a 32-bit-only package, you can only load it in it in an 
32-bit R instance, not in a 64-bit R.
4. 32-bit R runs fine under 64-bit Windows.

Best,
Uwe Ligges





On 01.02.2011 01:06, 刘力平 wrote:
> Hi,
>
> I uploaded my package to http://win-builder.r-project.org/ and had it built.
>
> It can work on one machine, but on the other, it reports:
>
> Loading required package: grt
> Error: package 'grt' was built for i386-pc-mingw32
> In addition: Warning message:
> package 'grt' was built under R version 2.12.1
> Execution halted
>
> Is it because the package is built for win32? But in the manual it says R
> for win32 works good on win64.
>
> Note that the package has some C++ code.
>
> best,
> Liping Liu
>
>
>
>
> On Thu, Jan 27, 2011 at 1:21 AM, Prof Brian Ripley<ripley at stats.ox.ac.uk>wrote:
>
>> On Thu, 27 Jan 2011, Barry Rowlingson wrote:
>>
>>   On Thu, Jan 27, 2011 at 7:57 AM, 刘力平<liping.liulp at gmail.com>  wrote:
>>>
>>>> Hi,
>>>>
>>>> I write a package in Linux and ready to distribute, and I can install it
>>>> in
>>>> linux and run it.
>>>> However, when I have install it in my Windows' R.
>>>>
>>>> I can not 'require' it.
>>>>
>>>>   is.element("grt", installed.packages()[,1])
>>>>>
>>>> [1] TRUE
>>>>
>>>>> require(grt)
>>>>>
>>>> Loading required package: grt
>>>> Failed with error:  ‘'grt' is not a valid installed package’
>>>>
>>>> Is there any pitfall between platforms?
>>>> And anywhere I could check more detailed error message.
>>>>
>>>
>>> How did you install it in Windows? If you just copied it from the
>>> Linux install directory, or if its in a shared directory, it probably
>>> wont work.
>>>
>>> You need to do a proper R CMD INSTALL on Windows, and for that you'll
>>> need the assorted dev tools for building R packages on Windows.
>>>
>>
>> For the record: these days you do not need any extra tools unless the
>> package contains code that needs compilation, and in the latter case we
>> provide the win-builder service.
>>
>> However, the message indicates no file grt/Meta/package.rds, which would be
>> there if the package was copied from Linux.  So we need to know exactly what
>> was done.
>>
>>
>>> Barry
>>>
>>> ______________________________________________
>>> 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.
>>>
>>>
>> --
>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/>
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
> 	[[alternative HTML version deleted]]
>
>
>
>
> ______________________________________________
> 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.



More information about the R-help mailing list