0

I have recently started using the Cloud 9 IDE and migrated my code from Windows 7 Professional system. Cloud 9 provides an Ubuntu VM pre-configured with Node.js, Python, etc. I am unable to install my favorite programming language, R, using the set of instructions provided on the CRAN site.

This is the set of instructions here.

I am unable to get this off the ground and have tripped over the very first step of downloading R from a CRAN mirror. I have tried:

somebody:~/workspace $ deb https://cran.stat.auckland.ac.nz/bin/linux/ubuntu trusty/
bash: deb: command not found

Clearly, I am a noob when it comes to Linux. Any help?

Sun Bee
  • 1,595
  • 15
  • 22
  • deb is not a command, it tells you where the repository is. You need to add it to sources.list try `echo "deb https://cran.stat.auckland.ac.nz/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list` – jeremycg Apr 27 '16 at 18:11
  • The answer Sun Bee gave below should be sufficient to install R on Ubuntu. You also might want to set up a custom runner to run your code from within cloud9. Go to Run/Run With/New Runner and use the following JSON: { "cmd": ["Rscript","--no-save","$file","$args" ], "info": "Started $project_path$file_name", "env": {}, "selector": "source.r" } There are other ways passing your code from cloud9 to R, it is very similar to SublimeText or Atom. – Eli Duenisch Jul 22 '16 at 00:06

1 Answers1

4

Update:

  1. Downloaded with

    wget http://cran.r-project.org/src/base/R-3/R-3.0.3.tar.gz
    tar -xzf R-3.0.3.tar.gz
    cd R-3.0.3
    
  2. Installed with

    sudo apt-get update
    sudo apt-get install r-base
    
  3. Launched as

    someone:~/workspace/R-3.0.3 $ R
    
Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
Sun Bee
  • 1,595
  • 15
  • 22