2

I've got an error while trying to add the R cran mirror for Switzerland to the sources.list file (http://stat.ethz.ch/CRAN/), even though I followed the instructions from page http://stat.ethz.ch/CRAN/ (I'm running Ubuntu 13.04) I really can't find what I'm doing wrong... here are my steps:

sudo gedit /etc/apt/sources.list

then, in the source.list file, I added a line like that, at the very end:

#R repositories switzerland 
http://stat.ethz.ch/CRAN/bin/linux/ubuntu raring/  

then, save and exit and the error appears when typing the sudo apt-get update command:

sudo apt-get update 
E: Type 'http://stat.ethz.ch/CRAN/bin/linux/ubuntu' is not known on line 60 in
source list /etc/apt/sources.list
E: The list of sources could not be read.    

why?

Thank you for your answers!

dovah
  • 53
  • 1
  • 7
  • I think you can't mix R repos and Ubuntu repos. When doing a command such as install.packages() from within R, it should prompt you to pick a repo. There you can choose CH. – Waldir Leoncio Jul 22 '13 at 20:02
  • that's ok, I just followed the instruction on the R webpage – dovah Jul 23 '13 at 08:17

1 Answers1

3

héhé found the answer: just adding 'deb' before the link:

deb http://stat.ethz.ch/CRAN/bin/linux/ubuntu raring/    

However, people can simply install directly by running from terminal

sudo apt-get install r-base     

it's much easier and worked for me (R installed and works well)

amc
  • 7,142
dovah
  • 31
  • 1