[ESS] Unable to load library (package)

Aric Gregson aorchid at mac.com
Sat Jun 25 20:10:25 CEST 2005


Kasper,

--On 6/25/05 1:18 AM +0200 Kasper Daniel Hansen sent:

> On Fri, 24 Jun 2005, Aric Gregson wrote:
>
>> --On 6/24/05 7:13 PM +0200 Kasper Daniel Hansen sent:
>>
>> > On Fri, 24 Jun 2005, Aric Gregson wrote:
>> >
>> >> --On 6/24/05 4:35 AM +0200 Kasper Daniel Hansen sent:
>> >>
>> >> > My guess is that it is a path issue, that your path is not the
>> >> > same in the  two instances.
>> >> >
>> >> > Could you do a
>> >> >   R> .libPaths()
>> >> > on the two platforms. You will probably see that they differ and
>> >> > that you  need to add something to the ESS process. The easiest
>> >> > way to do this  (there are probably others), is to create a file
>> >> >   ~/.Renviron
>> >> > containing the line
>> >> > R_LIBS=/Users/kdh/Rlib
>> >> > with the /Usres/kdh/Rlib being exchanged with something
>> >> > appropriate. If  you need several directories, use : to separate
>> >> > them.
>> >>
>> >> I've created the file ~/.Renviron and placed the two directories
>> >> that  came up in R Aqua. However, ESS still returns the same
>> >> error. Do I need  to tell ESS to use the file ~/.Renviron somehow?
>> >
>> > R should use the ~/.Renviron file automatically.
>> >
>> > But before you spend more time on this: do you get two different
>> > results  from .libPaths() when you execute the command in R Aqua as
>> > opposed to  within ESS? If that is the case, you take the paths in
>> > R Aqua not present  in ESS and add them to the ~/.Renviron
>> >
>> > In my case (which for now is pretty default, I am new to MacOS), my
>> > ~/.Renviron looks like
>> >
>> > R_LIBS=/Users/kdh/Library/R/library
>> > R_PAPERSIZE=letter
>> > R_EDITOR=/usr/bin/nano
>> >
>> > With that setting .libPaths() returns
>> >> .libPaths()
>> > [1] "/Users/kdh/Library/R/library"
>> > [2] "/Library/Frameworks/R.framework/Resources/library"
>> >
>> > If in doubt, just send me the output of the two .libPaths()
>> > commands. It  might be something completely different you have
>> > problems with ... I am  just makiing a guess based on my own
>> > struggles :)
>>
>> In R Aqua I get nearly as you do above:
>> > .libPaths()
>>  [1] "/Users/aorchid/Library/R/library"
>>  [2] "/Library/Frameworks/R.framework/Resources/library"
>>
>> In ESS R I get only
>> "/Library/Frameworks/R.framework/Resources/library". My ~/.Renviron
>> file has the following:
>>
>> R_LIBS=/Users/aorchid/Library/R/library :
>> /Library/Frameworks/R.framework/Resources/library
>>
>> Not sure why it isn't working.
>
> The : separation should be on one line I think, like
> R_LIBS=/Users/aorchid/Library/R/library:/Library/Frameworks/R.framewo
> rk/Resources/library
>
> But you really only need to add  directories which are not present,
> ie. I  would only do
> R_LIBS=/Users/aorchid/Library/R/library

That did the trick!!  Thanks very much for your help.

aric

>> >> >> ess-help,
>> >> >>
>> >> >> I have searched the archives, but did not find anything
>> >> >> specific.
>> >> >>
>> >> >> I get the following error after ESS starts without problems or
>> >> >> errors:
>> >> >>     > library(Design)
>> >> >>     Error in library(Design) : there is no package called
>> >> >>     'Design'
>> >> >>
>> >> >> This after I just did rebuild the package from local source. It
>> >> >> works fine in R Aqua. There are other packages that I cannot
>> >> >> load as well. I have the packages installed in /Library/....,
>> >> >> not in the local userland.
>> >> >>
>> >> >> I am running OS X 10.3.9, ESS 5.2.8, R version 2.1.0 and Carbon
>> >> >> GnuEmacs of April 2005.
>> >> >>
>> >> >> Any suggestions? It is working fine on another mac with same
>> >> >> configuration (at least I thought the same configuration).
>> >> >>
>> >> >> thanks,
>> >> >>
>> >> >> aric




More information about the ESS-help mailing list