How to install R on Ubuntu 16.04 Xenial?












3















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 '18 at 17:20











  • @user68186 The other answer is a shell script that does everything for me :)

    – frank
    Mar 8 '18 at 17:23
















3















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 '18 at 17:20











  • @user68186 The other answer is a shell script that does everything for me :)

    – frank
    Mar 8 '18 at 17:23














3












3








3








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?







16.04 r






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 '18 at 17:12









frankfrank

9710




9710













  • This may be relevant: askubuntu.com/questions/919275/…

    – user68186
    Mar 8 '18 at 17:20











  • @user68186 The other answer is a shell script that does everything for me :)

    – frank
    Mar 8 '18 at 17:23



















  • This may be relevant: askubuntu.com/questions/919275/…

    – user68186
    Mar 8 '18 at 17:20











  • @user68186 The other answer is a shell script that does everything for me :)

    – frank
    Mar 8 '18 at 17:23

















This may be relevant: askubuntu.com/questions/919275/…

– user68186
Mar 8 '18 at 17:20





This may be relevant: askubuntu.com/questions/919275/…

– user68186
Mar 8 '18 at 17:20













@user68186 The other answer is a shell script that does everything for me :)

– frank
Mar 8 '18 at 17:23





@user68186 The other answer is a shell script that does everything for me :)

– frank
Mar 8 '18 at 17:23










2 Answers
2






active

oldest

votes


















3
















  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 3B4FE6ACC0B21F32

    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

































    0














    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',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      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















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3
















      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 3B4FE6ACC0B21F32

        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






























        3
















        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 3B4FE6ACC0B21F32

          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




























          3












          3








          3









          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 3B4FE6ACC0B21F32

            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 3B4FE6ACC0B21F32

            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 Jan 16 at 21:03

























          answered Mar 8 '18 at 17:38









          N0rbertN0rbert

          22.3k648105




          22.3k648105

























              0














              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






























                0














                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




























                  0












                  0








                  0







                  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 '18 at 18:07

























                  answered Mar 8 '18 at 17:13









                  frankfrank

                  9710




                  9710






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      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















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to make a Squid Proxy server?

                      Is this a new Fibonacci Identity?

                      19世紀