loading rgdal fails
Loading rgdal in RStudio fails, but not in the regular R environment. Any idea why? I've posted a question about this on stackoverflow (http://stackoverflow.com/questions/7852679/trouble-loading-rdgal-in...).
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Josh Paulson on 21 Oct, 2011 07:55 PM
Andy,
Not sure why this isn't working on your system, but I was able to get it working just fine. I noticed that you downloaded GDAL Complete from kyngchaos.com to install rgdal. Can you instead try the following method from within RStudio and let me know if it works.
This is how I got it working. And just to be clear, after
setRepositories(), you just type "1 2" and then press enter to enable the CRAN (extras) repository. If this doesn't work, can you check your log files:http://support.rstudio.org/help/kb/troubleshooting/rstudio-applicat...
Josh
3 Posted by andy.barbour on 21 Oct, 2011 08:12 PM
Thanks, Josh.
Your method works. I first had to remove the existing package directory, but then
install.packages("rgdal")can complete its task, andlibrary(rgdal)loads normally.I'm still confused why that might have happened. Ownership or permissions?
Anyways, thanks again.
Support Staff 4 Posted by Josh Paulson on 21 Oct, 2011 08:30 PM
Andy,
Glad that works, and not entirely sure why the other method caused problems. Looks like when you installed the GDAL framework it also put the package in that location
/Library/Frameworks/GDAL.framework/Versions/1.8/Resources/gdal. Perhaps your path wasn't updated as when called from RStudio, it was searching in the wrong directory/Library/Frameworks/R.framework/Resources/lib/libgcc_s.1.dylib. Maybe updating.libPaths()would have done it, but not sure.Just for reference, on my end when installing from the CRAN (extras) repository it just put it in the standard library location:
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rgdal/gdal.Let us know if anything else comes up though,
Josh
Josh Paulson closed this discussion on 25 Oct, 2011 11:48 AM.