ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Install Package In R Command Line
    카테고리 없음 2020. 2. 14. 19:20
    1. R Cmd Install Example
    2. R Download Package Command
    3. Windows R Install Package

    Introductionis a popular open source programming language that specializes in statistical computing and graphics. It is widely used by statisticians for developing statistical software and performing data analysis. One of R's strengths is that it is highly and easily extensible by allowing users to author and submit their own packages.

    R Cmd Install Example

    Install package in r command line

    R Download Package Command

    The R community is known to be very active and is noted for continuously adding user-generated statistical packages for specific areas of study, which makes R applicable to many fields of study.The 'Comprehensive R Archive Network' is a collection of sites (called mirrors) which carry identical material, consisting of many R packages and the R distributions themselves. You can download R and many R packages from any of the, but we will use the mirror.In this guide, we will learn how to set up R on a DigitalOcean Droplet running Ubuntu 14.04. If your Droplet is running a different operating system, most of the instructions will still apply, but you may need to modify some of the commands. Following this guide to completion should take about 10-15 minutes. PrerequisitesFor this tutorial, you will need:. An Ubuntu 14.04 Droplet with at least 1 GB of RAM.

    All the commands in this tutorial should be run as a non-root user. If root access is required for the command, it will be preceded by sudo. Explains how to add users and give them sudo access.Step 1 — Setting Up APTTo install R, we're going to use the APT (Advanced Packaging Tool) tool. It uses a special file that lists the sources of where packages should be downloaded from.

    That file is /etc/apt/sources.list. In order to get the most recent version of R, we need to add the correct repository to the list of sources by adding a line to the sources file. The exact line you need to add will vary depending on the exact Ubuntu version. For Ubuntu 14.04, run the following command to add the correct repository to /etc/apt/sources.list. sudo sh -c 'echo 'deb trusty/' /etc/apt/sources.list'If you are running a different Ubuntu version, consult for the correct repository to add.To authenticate packages downloaded using APT, we have to add a public key. The Ubuntu archives on CRAN are signed with a key with ID E084DAB9.

    Add this key to your system. gpg -keyserver keyserver.ubuntu.com -recv-key E084DAB9Next we need to add the key to apt. gpg -a -export E084DAB9 sudo apt-key add -Step 2 — Installing RNow that APT has been set up properly, we are ready to use it to install R.First, we need to update the list of available packages since we updated the sources list. sudo apt-get updateNow we can install R. We use the -y flag to automatically answer Yes when asked if we are sure we want to download the package.

    Windows R Install Package

    sudo apt-get -y install r-baseAt this point, you should have an installation of the latest R version on your Droplet. You can test this by running the R command. RYou should see output similar to the following.

Designed by Tistory.