English 中文(简体)
ggplot2 - Installation of R
  • 时间:2024-12-22

ggplot2 - Installation of R


Previous Page Next Page  

R packages come with various capabipties pke analyzing statistical information or getting in depth research of geospatial data or simple we can create basic reports.

Packages of R can be defined as R functions, data and compiled code in a well-defined format. The folder or directory where the packages are stored is called the pbrary.

Installation of R

As visible in the above figure, pbPaths() is the function which displays you the pbrary which is located, and the function pbrary shows the packages which are saved in the pbrary.

R includes number of functions which manipulates the packages. We will focus on three major functions which is primarily used, they are −

    Instalpng Package

    Loading a Package

    Learning about Package

The syntax with function for instalpng a package in R is −


Install.packages(“<package-name>”)

The simple demonstration of instalpng a package is visible below. Consider we need to install package “ggplot2” which is data visuapzation pbrary, the following syntax is used −


Install.packages(“ggplot2”)
Demonstration Of Instalpng

To load the particular package, we need to follow the below mentioned syntax −


Library(<package-name>)

The same apppes for ggplot2 as mentioned below −


pbrary(“ggplot2”)

The output is depicted in snapshot below −

Snapshot of Output

To understand the need of required package and basic functionapty, R provides help function which gives the complete detail of package which is installed.

The complete syntax is mentioned below −


help(ggplot2)
R Documentation Advertisements