How to make R-base work

by acaza

From the Website (http://www.r-project.org/ ): "R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R." R is widely used for statistical software development and data analysis, and has become a de-facto standard among statisticians for the development of statistical software.

R is powerful software for interacting with data. With R you can create sophisticated graphs, you can carryout statistical analyses, and you can create and run simulations. R is also a programming language with an extensive set of built-in functions, so you can, with some experience, extend the language and write your own code to build your own statistical tools. Advanced users can even incorporate functions written in other languages, such as C, C++, and Fortran.

screenshot

I needed the statistics of R, but was unsuccessful using the R-base available from Synaptic. I could install it, but when I tried to use the "install.packages" function in R to get new packages I needed, it failed. The packages downloaded from the mirror as expected, but then they failed to install on my computer. I was left with a bunch of useless ZIP files in a TMP folder. I'm a Linux newbie (seven days total experience, as I write this), so I might have been doing something wrong.

However, I still needed R, and I managed to install it directly from the source code. Step-by-step, I did this:

  1. Download source file R-2.4.1.tar.gz from here:
    http://lib.stat.cmu.edu/R/CRAN/
  2. Extract it by opening a terminal, navigating to the folder where you saved the download, and typing:

    tar xvfz R-2.4.1.tar.gz

    Note that you must get the name exact, including capitalization.

  3. Once the tar has been extracted, open Konqeror in Super-User mode (Applications -> File Tools -> File Manager -> Superuser Mode) and move the folder created when you extracted the tar (R-2.4.1) to /usr/lib/
  4. The only dependency not met in my Big Daddy version of PCLOS had something to do with Fortran77 compiling. I used Synaptic to update gcc-g77 and perl_ExtUtils_F77. That took care of it.
  5. Then I followed the directions for installing from the CRAN site: http://lib.stat.cmu.edu/R/CRAN/doc/manuals/R-admin.html in section 2 (installing R under UNIX-alikes). Essentially there was only two steps performed in a terminal:
    ./configure
    make
    

    The CRAN page gives some additional steps about making manuals and help pages and such, but the steps above gave me a working installation of R.

NOTE: "R" will not appear in the application launcher the way it does with a Synaptic install. I think this is a good thing, because the GUI that comes with the Synaptic version has no scroll function; you can't look at the early parts of long output. With the installation from source, I simply enter "R" (without the quotes) in a terminal and the program runs right there. Much better for me.

I hope this makes sense, and that it helps anyone having similar trouble.

Top