[R-SIG-Mac] Can't get help.start() to work.

Rolf Turner r.turner at auckland.ac.nz
Thu Oct 29 23:32:59 CET 2009


On 30/10/2009, at 4:10 AM, Simon Urbanek wrote:

	<snip>

>> 	from the command line (in the window opened by the GUI).  I get an
>> error:
>>
>>> Loading required package: mgcv
>>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>>  unable to load shared library '/Users/rturner/Rlib/lattice/libs/
>>> i386/lattice.so':
>>>  dlopen(/Users/rturner/Rlib/lattice/libs/i386/lattice.so, 6):
>>> Library not loaded: /Library/Frameworks/R.framework/Versions/2.7/
>>> Resources/lib/libR.dylib
>
> note the version 2.7 there - you have apparently old packages for a
> different version of R on your .libPaths() -- bad thing.

	I don't understand how the 2.7 gets in there.  My .libPaths()
	(from the GUI startup) says:

> > .libPaths()
> [1] "/Users/rturner/Rlib"                               "/Library/ 
> Frameworks/R.framework/Resources/library"

	And /Library/Frameworks/R.framework is the current install
	of 2.10.0.  I had a look in /Library/Frameworks/R.framework/Versions/ 
Current
	and it indeed seems to be the current version.

	So how the (expletive deleted) is version 2.7 getting dragged
	into the picture?

> I suspect this is all rather due to the customization and chaos
> created by the user ;) - the GUI actually tries to prevent such things
> by using separate library directories for each R version by default,
> but if you override that with your settings (especially using one
> global library), you can mess up things - but that's true in R in
> general, not really related to GUIs.

	As far as I can tell, the only customization that I've done
	is to use ~/Rlib as my ``local'' personal library of packages.
	I.e. I have the lines

> .libPaths("/Users/rturner/Rlib")
> Sys.setenv(R_LIBS="/Users/rturner/Rlib")


	in my .Rprofile.  Is there anything wrong with that?

	BTW, you wrote:

> Check your .libPaths() - I bet they are different and you have
> outdated packages in one of them. If you wonder why, check your
> preferences.

	You lose your bet!  From GUI startup I got .libPaths() as
	shown above.  From the command line startup I get

>   > .libPaths()
>  [1] "/Users/rturner/Rlib"
>  [2] "/Library/Frameworks/R.framework/Resources/library"

	Looks the same to me!

		cheers,

			Rolf

P. S.  Since I'm raving on, I shall rave about another issue that has  
puzzled me
immensely.  I cannot seem to get package installation to work  
(completely)
from within R.  If I do something like

  > install.packages("plotrix",lib="Rlib")
> --- Please select a CRAN mirror for use in this session ---
> Loading Tcl/Tk interface ... done
> trying URL 'http://cran.stat.auckland.ac.nz/bin/macosx/universal/ 
> contrib/2.10/plotrix_2.7-2.tgz'
> Content type 'application/x-tar' length 415153 bytes (405 Kb)
> opened URL
> ==================================================
> downloaded 405 Kb
>
>
> The downloaded packages are in
>         /tmp/Rtmpxp23QK/downloaded_packages
> Warning messages:
> 1: In file.rename(file.path(tmpDir, curPkg), instPath) :
>   cannot rename file 'Rlib/file60b7acd9/plotrix' to 'Rlib/plotrix',  
> reason 'No such file or directory'
> 2: unable to move temporary installation 'Rlib/file60b7acd9/ 
> plotrix' to 'Rlib/plotrix'

If I (in another window) cd to /tmp/Rtmpxp23QK/downloaded_packages I  
find
a file plotrix_2.7-2.tgz, and if I then execute

	R CMD INSTALL plotrix_2.7-2.tgz

from the (shell) command line, it installs just fine.

Any insights into what's going wrong?

			R.

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-SIG-Mac mailing list