Installing rgdal on OSX (was digest ...)
On Thu, 23 Dec 2010, Ralf Sch?fer wrote:
Many thanks for your clarifications, Ralf. But if
Actually the 4 options more or less boil down to two if you check what is done in detail:
.../... then we are just discarding alternative 1 in my first post: "> setRepositories(ind=1:2)
install.packages('rgdal')
Well, if the normal repository binary works, then there is no problem in the first place.
Exactly!!! Why do you think that Brian Ripley and others went to considerable trouble to provide it? Currently version 0.6-31 is available from CRAN extras for leopard on R 2.12, and rgdal 0.6-27 for leopard on R 2.11. On Kyngchaos, rgdal 0.6-29 is available for R 2.12, 0.6-28 for R 2.11. Kyngchaos may provide a wider range of drivers. Neither of these require the user to install source building support with Xcode and other software is if the version of rgdal is not the one required, and/or if extra drivers are required. In addition, using CRAN extras and update.packages() will update rgdal if and when a newer version is produced. That said, and I sympathise with Barry's observations of apparently clueless OSX users - it happens, installing from source is not hard[1], and the Kyngchaos Frameworks are probably the most convenient way to proceed, as they the "stack" with GRASS or QGIS, ensuring that all the OSGeo software in use is the same.
And I probably commented based on the discussion with Daniel on the R-sig geo list yesterday and from experiences that often problems occur.
Only if people do not think, really! If Daniel had read and understood what was output to his console, he would have know immediately what to do. Whether he didn't read it, or didn't understand, is uncertain, but posting verbating output saying: "The gdal-config script distributed with GDAL could not be found. If you have not installed the GDAL libraries, you can download the source from http://www.gdal.org/ If you have installed the GDAL libraries, then make sure that gdal-config is in your path. Try typing gdal-config at a shell prompt and see if it runs. If not, use: --configure-args='--with-gdal-config=/usr/local/bin/gdal-config' with appropriate values for your installation." does not suggest reading and understanding. Before any installation from source, please do run: gdal-config --version gdalinfo --version at a console prompt; if you do not know what a console prompt is, within R use: system("gdal-config --version") system("gdalinfo --version") and make sure that the versions reported are the same. If either throws an error, such as command not found, then GDAL is not installed correctly, and installing rgdal will surely fail. Note that in the R world, OSX is treated as being close to Unix in user skill requirements, certainly more demanding than Windows, which is the suggested OS for users who are neither able nor willing to compile anything. For lab installs, do use CRAN/CRAN extras for binary contributed packages. Hope this clarifies, Roger [1] Hard - that is, how much effort is required of the user in installing and using software compared to other tasks the user performs in data collection, collation, literature review, handling measurement tools, etc. Using a computer for scientific research is not the same as using it as a music player or telephone, because the user has to make reasoned choices, and should understand the tool well. If not, how on earth will the researcher understand the results?
But indeed - option 1 is certainly to use CRAN repositories after installing GDAL framework before. So, in my courses I usually show them first how to install the kyngchaos binaries and if that fails on some machines how to install from source - and was successful so far.
Also, what about homebrew? is this not a good way to make this type of things easier on Macs?
Well, in the example it only installs the binaries from kyngchaos, so it is basically the same as option 2 just uses command line and requiring prior installation of a package manager (you need homebrew, Xcode, type some command in Mac terminal etc.) But this is probably splitting hairs now.
Finally, where you say
BTW: "Linux Techies" should have no major probs with Mac, given that the Mac system commands are more or less the same as for Linux systems
The problem is that most mac users I've had as students are not Techies on anything. Otherwise, Macs are wonderful machines.
Comment was more targeted on "Macs into the world and expecting techies with only Linux
(and a smidge of Windows) experience to fix them up."
and just wanted to state that for a Linux techie the Mac command line is not too difficult. But you actually do not need Shell command line to install packages from source anyway - all tools can be installed as binaries and the package can be built from within R. Anyway, have a good xmas Ralf
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no