How to Install a Package in R ? Last Updated : 21 Apr, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report R programming language doesn't come with all packages installed, and they need to be installed explicitly. In this article, we will discuss How to Install a Package in the R language. Installing packages in Rstudio. Method 1: Using application options 1. Open R studio. 2. Select tools 3. After selecting the tools you need to press install packages. 4. Here you need to give the package name you need to install. Here we used expm. This function computes the exponential of a square matrix. Installing packages in RGui: 1. Open RGui 2. Select packages 3. Select install packages. 4. Select required package and click ok. Package will be installed package 'expm' successfully unpacked and MD5 sums checked Method 2: Using command In this method, simply pass the package to be installed as an argument to install.packages() function Syntax: install.packages("package name") Example: R install.packages("ggplot2") Loading a package A package can be loaded once it has been installed using library() command. Syntax; library("package_name") Example: R library("ggplot2") Comment More infoAdvertise with us Next Article How to Install a Package in R ? B bhagiradhrayini25 Follow Improve Article Tags : R Language R-Packages Similar Reads How to Install XML Package in R The XML package in R is essential for parsing and processing XML (Extensible Markup Language) documents. XML is widely used for data interchange on the web and within various software applications. This guide will cover the theory behind XML and the XML package, how to install it, and practical exam 3 min read How to Install Package Keras in R Keras is a high-level neural networks API, written in Python, and capable of running on top of TensorFlow. The keras package in R provides an interface to the Keras library, allowing R users to build and train deep learning models in a user-friendly way. Below is a comprehensive guide on how to inst 2 min read How to Install rvest Package? The rvest package in R is an essential tool for web scraping. It simplifies the process of extracting data from web pages by providing functions to read HTML, extract elements, and clean the data. This guide will cover the theory behind rvest, how to install it, and practical examples of its usage.W 3 min read How to Install jsonlite Package in R? The jsonlite package in R is a highly versatile and robust tool designed for handling JSON (JavaScript Object Notation) data. JSON is a lightweight data-interchange format that is easy for humans to read and write, and easy for machines to parse and generate. The jsonlite package simplifies the proc 3 min read How to Install Scala packages in Databricks? In Scala, a package is a technique for grouping together classes, sub-packages, traits, and package objects. In essence, it offers a namespace so that we can place our code in various files and directories. The use of packages makes it simple to maintain our code and avoids name conflicts between me 2 min read Like