An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090209/fd2d3681/attachment-0001.pl>
installing R on Ubuntu
32 messages · cruz, Joseph Magagnoli, Brian Ripley +16 more
Messages 26–32 of 32
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090209/dba03065/attachment-0001.pl>
'combn' will give you the combinations that you can then use as parameters in the function:
combn(c('a', 'b', 'c'), 2)
[,1] [,2] [,3] [1,] "a" "a" "b" [2,] "b" "c" "c"
On Mon, Feb 9, 2009 at 11:44 AM, patricia garc?a gonz?lez
<kurtney_84 at hotmail.com> wrote:
Hi all, Having a matrix A formed by n vectors as columns. Is there anything to calculate a determined function to all combination of vectors? For example imagine A matrix is compose by vectors a, b and c. And the function to perform is correlation, so I would like to obtain cor(a, b), cor(a, c) and cor(b, c). I we had numbers instead of vector, the function is outer, but I am not able to apply it to vectors... Thanks a lot. P.
Date: Mon, 9 Feb 2009 08:37:06 -0800 From: zznmeb at gmail.com To: r-help at r-project.org Subject: Re: [R] installing R on Ubuntu On Mon, Feb 9, 2009 at 4:51 AM, Neil Shephard <nshephard at gmail.com> wrote:
The preceived "difficulty" of installing R under whatever flavour of GNU/Linux in this thread stems from being unfamiliar with the process of the package management of the flavour of GNU/Linux you use (and in part by the various distros not having the most recent version of R in their repositories. People who say "why can't it be as easy as dowloading a self-installing binary and running that" are trying to fit a round peg (their experience and understanding of how applications install in M$-windows) in a square hole (or triangular, hexagonal, or whatever depending on the distribution of GNU/Linux).
This is true. However, for the most common Linux distros --Debian, Red Hat Enterprise / CentOS / Scientific Linux / Fedora, openSUSE and Ubuntu -- you can install the most recent R compiled for your distro from http://<your-nearest-CRAN-mirror>/bin/linux/ In addition, most of the distros have third-party repositories where you can find the latest version of R. In short, if you have an x86 or x86_64/amd64 system running almost any Linux, you can find a pre-compiled R. R is a popular package, and it's pretty easy to find even for Power PC or some of the obscure architectures.
There are pro's and con's to each of the GNU/Linux flavours and its really a matter of deciding which you like/have invested time in learning. Irrespective its still simple to install R from source under GNU/Linux... 1) Download source tar-ball 2) Extract and cd to the directory 3) ./configure --prefix=/where/you/want/R/to/go (optionally setting the install path at this stage) 4) ./make 5) ./make install ...all documented in the FAQ at http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-R-be-installed-_0028Unix_0029
Many Linux distros do *not* install the development tools by default, and which ones live in which packages varies by distro. Fedora in particular is extremely stripped when you install from the LiveCD. You have to install gcc, make and a couple of other things just to install VMware Tools, for example, when running Fedora as a VMware guest. For building R from source and installing R packages, you'll also need to install gfortran. And many libraries with external dependencies, like Rgraphviz, will require not only the package itself (graphviz) but also the C headers, which may have the name "graphviz-devel" on some distros and some other name on other distros.
This might not be as clean as using the native package management, but does mean that you'll have the latest version installed. Neil (Addendum - I've tried several different distros, starting with RedHat 7.3, then various versions of Slackware 8 through to 9 before settling on Gentoo, all were easy to install R in).
I just recently switched from Gentoo to openSUSE. Gentoo usually had the latest R source in their repository within a day or so of it coming out of the R Project release cycle. To get it, all you needed to do was put the package name in the "/etc/portage/package-keywords" file. And Gentoo, since it is almost all compiled from source, by nature *does* have all the development tools installed and installs all the headers when it installs packages. -- M. Edward (Ed) Borasky I've never met a happy clam. In fact, most of them were pretty steamed.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
_________________________________________________________________
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
znmeb wrote:
On Mon, Feb 9, 2009 at 4:51 AM, Neil Shephard <nshephard at gmail.com> wrote:
There are pro's and con's to each of the GNU/Linux flavours and its really a matter of deciding which you like/have invested time in learning. Irrespective its still simple to install R from source under GNU/Linux... 1) Download source tar-ball 2) Extract and cd to the directory 3) ./configure --prefix=/where/you/want/R/to/go (optionally setting the install path at this stage) 4) ./make 5) ./make install ...all documented in the FAQ at http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-R-be-installed-_0028Unix_0029
Many Linux distros do *not* install the development tools by default, and which ones live in which packages varies by distro. Fedora in particular is extremely stripped when you install from the LiveCD. You have to install gcc, make and a couple of other things just to install VMware Tools, for example, when running Fedora as a VMware guest. For building R from source and installing R packages, you'll also need to install gfortran. And many libraries with external dependencies, like Rgraphviz, will require not only the package itself (graphviz) but also the C headers, which may have the name "graphviz-devel" on some distros and some other name on other distros.
What, a Linux distro that *doesn't* come with gcc!! I have to say I'm quite amazed at that!! gfortran is usually a component of gcc, no? I agree that ensuring libraries are available for all of the packages can be tricky, but its not insurmountable (although its one of the reasons I left Slackware in favour of Gentoo), but its no different to learning the vagaries of M$-windows. Its a common misconception I see frequently that "computers/software should just work", and thats really not the case. They do what they are told to, and the person using them often needs to understand them in a bit of detail, and this detail is often occluded under Windows so when people try to make the transition from to GNU/Linux they are initially over-whelmed. Anyway, all OT. Neil
View this message in context: http://www.nabble.com/installing-R-on-Ubuntu-tp10025949p21931845.html Sent from the R help mailing list archive at Nabble.com.
On Sun, Feb 8, 2009 at 1:36 PM, Tom Backer Johnsen <backer at psych.uib.no> wrote:
Dear me. Is the installation of R under Ubuntu really that complex? I have a dual boot machine (Linux / Windows, where I use the latter the most) and have plans to try R under Linux, but have not done so yet. Is it possible to simplify the Linux install procedure to make R more accessible to novices? Compare that to Windows. (1) Download installation program (2) Run installation program. That is it.
[other messages trimmed] I know that Dirk has already responded to you about sudo apt-get install r-base etc. so you are already set up. However, I couldn't resist pointing out that you describe installing the Windows binary package for running R and installing precompiled packages. If you should decide to build a package under Windows it ain't that simple. It is much, much simpler than it was in the past but it still involves a lot more than sudo apt-get install r-base-dev Windows and Linux are tuned to different types of users. Linux users love to be able to tinker (which is why my wife requires me to sit quietly and *not touch anything* whenever I visit her in her lab - there are stories of hours spent recalibrating instruments after I was left alone for just a few minutes). A full development environment installed with a minimum of fuss is expected by Linux users. Things are different under Windows.
On 11/02/2009, at 11:52 AM, Douglas Bates wrote:
<snip>
Things are different under Windows.
A fortune candidate?
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
Thanks, Paul, for the instructions. However, as it has been pointed out by Dirk a couple of times, most of these instructions (those related to R installation and the location of package files at least) can already be found in the Ubuntu README: http://cran.us.r-project.org/bin/linux/ubuntu/ Best regards, Vincent Le sam. 7 f?vr. ? 20:13, Paul Heinrich Dietrich a ?crit :
I've read some of R's literature on Linux, including the R Admin manual, and didn't find it very useful, which is probably my own limitation. But I did finally manage to get it working well. I'm posting this to help others. The following worked when installing R 2.8.1 on Ubuntu 8.04 Hardy Heron. Here are truly step-by-step instructions for those who don't know Linux (like me): Installation and Initial Set-Up of R for Ubuntu Linux 1. Open the Bash terminal (Applications > Accessories > Terminal) 2. Type these lines to add the security key to access the latest version of the R Ubuntu package: user at computer:~$ gpg --keyserver subkeys.pgp.net --recv-key E2A11821 user at computer:~$ gpg -a --export E2A11821 | sudo apt-key add - 3. Use the Bash terminal to open your sources.list file with gedit (text editor) for editing: user at computer:~$ sudo gedit /etc/apt/sources.list 4. Add this line to the bottom of the sources.list file: deb http://rh-mirror.linux.iastate.edu/CRAN/bin/linux/ubuntu hardy/ 5. Save the file and go back to the Bash terminal. 6. Type this to update apt-get's database before you install R: user at computer:~$ sudo apt-get update 7. Install R with this command: user at computer:~$ sudo apt-get install r-base 8. Go to System > Administration > Synaptic Package Manager, and download the build-essential package. 9. To use R, simply enter R in the Bash terminal. To quit, enter q(). Additional programs will be needed to install other packages or work with other programs: 1. Install compilers for C++ and Fortran user at computer:~$ sudo apt-get install g++ gfortran 2. Install the developer versions of Blas and Lapack (what are these?) user at computer:~$ apt-get install libblas-dev liblapack-dev Updating Packages in R 1. Open the Bash terminal and start R with root permissions user at computer:~$ sudo R 2. Type > update.packages() Installing the R Commander GUI 1. Open the Bash terminal and type: user at computer:~$ apt-get install r-cran-rcmdr Using the R Commander GUI library(Rcmdr) ...or once the library is open and Commander has been shut down, type: commander() Notes It looks like most of R has been put here: /etc/R (Rprofile.site is here) /usr/lib/R Downloaded Packages seem to go here: /usr/local/lib/R/site-library/ -- View this message in context: http://www.nabble.com/installing-R-on-Ubuntu-tp10025949p21894865.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.