Steps to Install an R Package

R programming language consists of a huge collection of packages at the cran and bioconductor repositories. This is also one of the reason for R language to become so popular.

To install an R package, follow these steps.

1. Open R prompt/terminal or RGui.

2. Run the command install.packages(“package_name”) where package_name is hte name of the package that you would like to install.

3. Select CRAM mirros. Go with the default selected mirror and click OK.

R install package

4. Let us install a package named “compare”.

> install.packages("compare")
Installing package into ‘C:/Users/TutorialKart/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cloud.r-project.org/bin/windows/contrib/3.5/compare_0.2-6.zip'
Content type 'application/zip' length 510919 bytes (498 KB)
downloaded 498 KB

package ‘compare’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\TutorialKart\AppData\Local\Temp\RtmpSW6t9I\downloaded_packages
>