[R-sig-teaching] installing Rcmdr

Douglas Bates bates at stat.wisc.edu
Sun Feb 15 18:49:26 CET 2009


On Sun, Feb 15, 2009 at 10:03 AM, tyler <tyler.smith at mail.mcgill.ca> wrote:
> Ista Zahn <istazahn at gmail.com> writes:
>
>> I've found the version of R in the Ubuntu repository is almost always
>> out of date. Here is the process I follow:
>>
>> 4) Start R from the command line as root so I can install packages
>> system-wide: sudo R
>
> As an alternative, if you set the permissions on
> /usr/local/lib/R/site-library to allow universal write access, you can
> call install.packages() from R without having root privileges:
>
> sudo chmod o+w /usr/local/lib/R/site-library
>
> This way you don't need to start a second R as root when installing new
> packages.

An alternative to changing permissions like this is to establish a
personal library in addition to the local site library.  First start R
and use sessionInfo() to find the major version of R and the system
type.  In my case the first two lines printed are

> sessionInfo()
R version 2.8.1 (2008-12-22)
i486-pc-linux-gnu

so the major version is 2.8 and the system type is i486-pc-linux-gnu.
Now create the directory

~/R/<systemType>-library/<majorVersion>/

That is, I would create

~/R/i486-pc-linux-gnu-library/2.8/

This directory will be the first element of the default .libPaths

> .libPaths()
[1] "/home/bates/R/i486-pc-linux-gnu-library/2.8"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"

and any packages I install will, by default, be installed there.  I
prefer this scheme to using system directories. Because I am
more-or-less the sole user of my computers running Ubuntu, it doesn't
result in redundancy.  Also, I can work with multiple versions of R
without conflict in my personal library and I can avoid conflicting
versions of code compiled for different architectures on our
departmental computers where home directories are on AFS, a network
file system.

>
> Cheers,
>
> Tyler
>
>> 5) From the R command prompt, install Rcmdr: >
>> install.packages("Rcmdr", dep=TRUE)
>> 6) Start Rcmdr and install additional packages when prompted.
>>
>> I've never had this procedure fail to produce a working installation.
>>
>> Hope it helps,
>> Ista
>>
>>
>> On Sat, Feb 14, 2009 at 9:24 PM, Robert W. Hayden <hayden at mv.mv.com> wrote:
>>>
>>> Last weekend I visited my sister and her husband and installed R on
>>> their Ubuntu 8.04 machine and tried to add Rcmdr.  I had endless
>>> trouble most of which seemed to be because R (or Rcmdr) seemed to want
>>> a Fortran compiler (or a Fortran-to-C translator).  A smaller number
>>> of error mesages (out of many pages thereof) were removed by
>>> installing what appeared to be a library of Fortran linear algebra
>>> routines (lblas?).  Even then Rcmdr complained about missing packages
>>> when I ran it, and though it offered to install them, the installation
>>> failed in every case, with no useful error messages.
>>>
>>> I have installed R and Rcmdr many times before to Windows and various
>>> Linux distributions (it's on this Debian right now)  and never had so
>>> much trouble.  Did I do something wrong?  Is there a problem with R on
>>> Ubuntu?  I have programmed in Fortran so I don't mind adding a
>>> compiler and I've taught linear algebra so I don't mind adding linear
>>> algebra routines, but there is no way my students would ever figure
>>> out that was needed.  I also noted that Rcmdr had a MUCH longer list
>>> of dependencies than I remember.  All of this has me worried about
>>> using R in an introductory course for folks who are not computer
>>> science majors.
>>>
>>> Has anyone encountered a similar problem?  I used whatever version of
>>> R is in the Ubuntu repository.  I seem to remember 2.4 though that
>>> seems a bit old.
>>>
>>> ------->  First-time AP Stats. teacher?  Help is on the way! See
>>>
>>>  http://courses.ncssm.edu/math/Stat_Inst/Stats2007/Bob%20Hayden/Relief.html
>>>
>>>  Robert W. Hayden in the old library at  212 Main Street (P. O. Box 450)
>>>  North Troy, VT 05859  phone (802) 988-2587  web site http://statland.org/
>>>  email  bob statland.org  (add your own "@" and save me some spam)
>>>
>>> _______________________________________________
>>> R-sig-teaching at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
>>>
>>
>
> --
> There is no theory of evolution.
> Just a list of animals Chuck Norris allows to live.
>
> http://www.chucknorrisfacts.com/
>
> _______________________________________________
> R-sig-teaching at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
>




More information about the R-sig-teaching mailing list