How to install R on Ubuntu 16.04 Xenial?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
3
down vote

favorite












Is there a convenient shell script that allows you to install everything at once?







share|improve this question




















  • This may be relevant: askubuntu.com/questions/919275/…
    – user68186
    Mar 8 at 17:20










  • @user68186 The other answer is a shell script that does everything for me :)
    – frank
    Mar 8 at 17:23














up vote
3
down vote

favorite












Is there a convenient shell script that allows you to install everything at once?







share|improve this question




















  • This may be relevant: askubuntu.com/questions/919275/…
    – user68186
    Mar 8 at 17:20










  • @user68186 The other answer is a shell script that does everything for me :)
    – frank
    Mar 8 at 17:23












up vote
3
down vote

favorite









up vote
3
down vote

favorite











Is there a convenient shell script that allows you to install everything at once?







share|improve this question












Is there a convenient shell script that allows you to install everything at once?









share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 17:12









frank

979




979











  • This may be relevant: askubuntu.com/questions/919275/…
    – user68186
    Mar 8 at 17:20










  • @user68186 The other answer is a shell script that does everything for me :)
    – frank
    Mar 8 at 17:23
















  • This may be relevant: askubuntu.com/questions/919275/…
    – user68186
    Mar 8 at 17:20










  • @user68186 The other answer is a shell script that does everything for me :)
    – frank
    Mar 8 at 17:23















This may be relevant: askubuntu.com/questions/919275/…
– user68186
Mar 8 at 17:20




This may be relevant: askubuntu.com/questions/919275/…
– user68186
Mar 8 at 17:20












@user68186 The other answer is a shell script that does everything for me :)
– frank
Mar 8 at 17:23




@user68186 The other answer is a shell script that does everything for me :)
– frank
Mar 8 at 17:23










2 Answers
2






active

oldest

votes

















up vote
3
down vote



accepted











  1. We need to add R repository, then install packages from it:



    cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
    deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
    EOF
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

    sudo apt-get update

    sudo apt-get install r-base r-base-dev



  2. Download RStudio from official site, for example, version 1.1.423, and install it with gdebi:



    wget https://download1.rstudio.org/rstudio-xenial-1.1.423-amd64.deb
    sudo apt-get install ./rstudio-xenial-1.1.423-amd64.deb






share|improve this answer





























    up vote
    0
    down vote













    Conveniently, there is, right here! The contents of this shell script:



    # Install R + RStudio on Ubuntu 16.04

    sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E084DAB9

    # Ubuntu 12.04: precise
    # Ubuntu 14.04: trusty
    # Ubuntu 16.04: xenial
    # Basic format of next line deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu <enter your ubuntu version>/
    sudo add-apt-repository 'deb https://ftp.ussg.iu.edu/CRAN/bin/linux/ubuntu xenial/'
    sudo apt-get update
    sudo apt-get install r-base
    sudo apt-get install r-base-dev

    # Download and Install RStudio
    sudo apt-get install gdebi-core
    wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
    sudo gdebi rstudio-1.0.44-amd64.deb
    rm rstudio-1.0.44-amd64.deb





    share|improve this answer






















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1013160%2fhow-to-install-r-on-ubuntu-16-04-xenial%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      3
      down vote



      accepted











      1. We need to add R repository, then install packages from it:



        cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
        deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
        EOF
        sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

        sudo apt-get update

        sudo apt-get install r-base r-base-dev



      2. Download RStudio from official site, for example, version 1.1.423, and install it with gdebi:



        wget https://download1.rstudio.org/rstudio-xenial-1.1.423-amd64.deb
        sudo apt-get install ./rstudio-xenial-1.1.423-amd64.deb






      share|improve this answer


























        up vote
        3
        down vote



        accepted











        1. We need to add R repository, then install packages from it:



          cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
          deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
          EOF
          sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

          sudo apt-get update

          sudo apt-get install r-base r-base-dev



        2. Download RStudio from official site, for example, version 1.1.423, and install it with gdebi:



          wget https://download1.rstudio.org/rstudio-xenial-1.1.423-amd64.deb
          sudo apt-get install ./rstudio-xenial-1.1.423-amd64.deb






        share|improve this answer
























          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted







          1. We need to add R repository, then install packages from it:



            cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
            deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
            EOF
            sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

            sudo apt-get update

            sudo apt-get install r-base r-base-dev



          2. Download RStudio from official site, for example, version 1.1.423, and install it with gdebi:



            wget https://download1.rstudio.org/rstudio-xenial-1.1.423-amd64.deb
            sudo apt-get install ./rstudio-xenial-1.1.423-amd64.deb






          share|improve this answer















          1. We need to add R repository, then install packages from it:



            cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
            deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
            EOF
            sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

            sudo apt-get update

            sudo apt-get install r-base r-base-dev



          2. Download RStudio from official site, for example, version 1.1.423, and install it with gdebi:



            wget https://download1.rstudio.org/rstudio-xenial-1.1.423-amd64.deb
            sudo apt-get install ./rstudio-xenial-1.1.423-amd64.deb







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 19 at 8:48

























          answered Mar 8 at 17:38









          N0rbert

          15.4k33171




          15.4k33171






















              up vote
              0
              down vote













              Conveniently, there is, right here! The contents of this shell script:



              # Install R + RStudio on Ubuntu 16.04

              sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E084DAB9

              # Ubuntu 12.04: precise
              # Ubuntu 14.04: trusty
              # Ubuntu 16.04: xenial
              # Basic format of next line deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu <enter your ubuntu version>/
              sudo add-apt-repository 'deb https://ftp.ussg.iu.edu/CRAN/bin/linux/ubuntu xenial/'
              sudo apt-get update
              sudo apt-get install r-base
              sudo apt-get install r-base-dev

              # Download and Install RStudio
              sudo apt-get install gdebi-core
              wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
              sudo gdebi rstudio-1.0.44-amd64.deb
              rm rstudio-1.0.44-amd64.deb





              share|improve this answer


























                up vote
                0
                down vote













                Conveniently, there is, right here! The contents of this shell script:



                # Install R + RStudio on Ubuntu 16.04

                sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E084DAB9

                # Ubuntu 12.04: precise
                # Ubuntu 14.04: trusty
                # Ubuntu 16.04: xenial
                # Basic format of next line deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu <enter your ubuntu version>/
                sudo add-apt-repository 'deb https://ftp.ussg.iu.edu/CRAN/bin/linux/ubuntu xenial/'
                sudo apt-get update
                sudo apt-get install r-base
                sudo apt-get install r-base-dev

                # Download and Install RStudio
                sudo apt-get install gdebi-core
                wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
                sudo gdebi rstudio-1.0.44-amd64.deb
                rm rstudio-1.0.44-amd64.deb





                share|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Conveniently, there is, right here! The contents of this shell script:



                  # Install R + RStudio on Ubuntu 16.04

                  sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E084DAB9

                  # Ubuntu 12.04: precise
                  # Ubuntu 14.04: trusty
                  # Ubuntu 16.04: xenial
                  # Basic format of next line deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu <enter your ubuntu version>/
                  sudo add-apt-repository 'deb https://ftp.ussg.iu.edu/CRAN/bin/linux/ubuntu xenial/'
                  sudo apt-get update
                  sudo apt-get install r-base
                  sudo apt-get install r-base-dev

                  # Download and Install RStudio
                  sudo apt-get install gdebi-core
                  wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
                  sudo gdebi rstudio-1.0.44-amd64.deb
                  rm rstudio-1.0.44-amd64.deb





                  share|improve this answer














                  Conveniently, there is, right here! The contents of this shell script:



                  # Install R + RStudio on Ubuntu 16.04

                  sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E084DAB9

                  # Ubuntu 12.04: precise
                  # Ubuntu 14.04: trusty
                  # Ubuntu 16.04: xenial
                  # Basic format of next line deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu <enter your ubuntu version>/
                  sudo add-apt-repository 'deb https://ftp.ussg.iu.edu/CRAN/bin/linux/ubuntu xenial/'
                  sudo apt-get update
                  sudo apt-get install r-base
                  sudo apt-get install r-base-dev

                  # Download and Install RStudio
                  sudo apt-get install gdebi-core
                  wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
                  sudo gdebi rstudio-1.0.44-amd64.deb
                  rm rstudio-1.0.44-amd64.deb






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 8 at 18:07

























                  answered Mar 8 at 17:13









                  frank

                  979




                  979



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1013160%2fhow-to-install-r-on-ubuntu-16-04-xenial%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      Which professions warranted travel in Medieval times?

                      How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                      Trouble downloading packages list due to a “Hash sum mismatch” error