Trying to install R, statistical software

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
mg_newbie
Level 1
Level 1
Posts: 7
Joined: Wed Aug 31, 2011 3:22 am

Trying to install R, statistical software

Post by mg_newbie » Wed Sep 07, 2011 10:18 pm

I am trying to install a statistical analysis software called R. It has downloads for linux distros debian, ubuntu, redhat, and fedora. I obviously am running mint (11 Kayta Main edition) so I thought I would try the ubuntu install because to my knowledge mint is similar to ubuntu so I thought maybe it would work.

When I click on the ubuntu link to the install files there is a huge list of files { http://www.biometrics.mtu.edu/CRAN/bin/linux/ubuntu/ }, most with different extensions. I'm new to linux and I have no idea what those are. I know .deb packages are comparable to windows .exe and mac .dmg but when I download the .deb file I get this error from the Package Installer : Error: Dependency is not satisfiable: r-base-core (= 2.13.1-1maverick2) I tried it with their natty version as well and got the same error except replace maverick with natty. I don't know if I need some of those other files to "satisfy the dependency" or whatever.

I know I can get the source code and compile it myself and I have tried to start but just get really lost. I really want to know more about linux and what makes it tick, I'm just a little overwhelmed with the "just google it" to get a solution. Any help is appreciated, thank you again.

Also, what is a mirror? I kept seeing that talked about on the install instructions. Thanks again

Mark

User avatar
xenopeek
Level 24
Level 24
Posts: 24020
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Trying to install R, statistical software

Post by xenopeek » Thu Sep 08, 2011 3:28 am

Okay, let's do this the easy way :D

1) Select a mirror:
Go to http://cran.r-project.org/mirrors.html and scroll down to either your country, or a country near you. Click on one of the links there, and see if you go to that page without any server errors and it appears fast. Else try another one. If you have found a good one, go back to http://cran.r-project.org/mirrors.html and copy the URL of the mirror. For example, I'm in the Netherlands, so I copy the text "http://cran-mirror.cs.uu.nl".

2) Make a sources.list line:
You are using Linux Mint 11, which is based on Ubuntu 11.04 aka "Natty Narwhal". So we take the natty line:
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu natty/
And insert the mirror URL we copied. In my example, this will give:
3) Add the software repository:
Go to Menu -> Control Center -> Software Sources. Select the "Other Software" tab, and click "Add..." button. Copy the sources.list line you created in step 2 here. So in my example, copy the following line here:
Click "Add Source" to close this. Now click "Close" button. It will pop up with "The information about available software is out-of-date", click the "Reload" button. Finally it will give an error that the mirror doesn't have a public key, accept that and we'll fix it in the next point.

4) Secure software repository:
Open a terminal and run the following three commands to create a secure connection with the repository:

Code: Select all

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
5. Install the software:
Go to Menu -> Software Manager, and search for r-base. Click and install the package you want to install.

Edit: added 4th step, with thanks to feodor.
Last edited by xenopeek on Thu Sep 08, 2011 6:44 am, edited 2 times in total.
Image

feodor
Level 1
Level 1
Posts: 23
Joined: Fri Mar 26, 2010 7:45 am

Re: Trying to install R, statistical software

Post by feodor » Thu Sep 08, 2011 4:49 am

http://cran.r-project.org/bin/linux/ubuntu/ has instructions on how to install R using "secure apt"; this will avoid the "no public key"-warnings (and -problems?)

Feodor

flegmatiq
Level 1
Level 1
Posts: 1
Joined: Sat Sep 10, 2011 4:29 am

Re: Trying to install R, statistical software

Post by flegmatiq » Sat Sep 10, 2011 4:38 am

You can follow as well these instructions (applies also for Natty, read the Brian Terrel's comment).

MintBatman
Level 1
Level 1
Posts: 12
Joined: Sun Apr 13, 2014 6:49 pm

Re: Trying to install R, statistical software

Post by MintBatman » Sun Apr 27, 2014 1:16 pm

Skip the start of the Ubunto documentation on R until you see the following 2 command.

The two commands in the Terminal you are to use are...

sudo apt-get update

sudo apt-get install r-base

This first will get you the lastest versions and the next will get you r-base.

Then you have want to look at the dev command. So read the little bit about using the command sudo apt-get install r-base-dev

That will get you started.

If you are looking for the GUI then you may want to check out RStudio but that parts up to you.

Post Reply

Return to “Software & Applications”