[R] R 64 and R: using 64-bit versions of packages in R (32)

cls59 chuck at sharpsteen.net
Sat Oct 24 02:47:07 CEST 2009




Richard Liu wrote:
> 
> I'm running R 2.9.2 build 5464 on OS X 10.5.8.  Having encountered  
> memory allocation problems, I ran the problematic code in R64, the 64- 
> bit version of the same build.  When I attempt to load openNLP I  
> receive the error message that the 32-bit version that I had been  
> using does not run in R64.
> 
> Assuming there is a 64-bit version, can I install and load it in R64  
> and, when I subsequently switch to R (32-bit), will 64-bit versions of  
> packages run there?  I'm trying to avoid constantly having to manually  
> switch between 32- and 64-bit versions of packages.
> 
> Regards,
> Richard
> 
> 

I don't think they will. The problem comes when the package has some
compiled code, in the form of a shared library, that R needs to load. A
32-bit version of R cannot load a 64-bit shared library, and vice versa.

However, R should handle this by building/downloading a separate version of
each package for each architecture listed in:

  /Library/Frameworks/R.Framework/Resources/bin/exec

Whenever you run install.packages() or R CMD INSTALL. If you are having
trouble, try reinstalling the offending packages. If there are still
problems, it is probably because the 32 and 64 bit versions of R are not
sharing the same living space, so the installers don't know there are
additional architectures that need to be included.

If this is the case, I would recommend installing the quad-arch build from:

  http://r.research.att.com/

And then, depending on which processor you have, removing either ppc and
ppc64 or i386 and x86_64 from:

  /Library/Frameworks/R.Framework/Resources/bin/exec

To prevent unnecessary compiler headaches. 

Note you will also have to download the 64 bit version of the GUI from the
ATT page if you want to use the GUI with 64 bit R.

Good luck!

-Charlie


-----
Charlie Sharpsteen
Undergraduate
Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: http://www.nabble.com/R-64-and-R%3A--using-64-bit-versions-of-packages-in-R-%2832%29-tp26034947p26035109.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list