Install ggplot2
mainYou can install ggplot2 in several ways depending on your needs:
- Install the entire tidyverse: This is the easiest way to get
ggplot2along with other related packages. - Install only ggplot2: Use this if you want to minimize dependencies.
- Install the development version: Use
pakto install directly from GitHub.
# The easiest way to get ggplot2 is to install the whole tidyverse:
install.packages("tidyverse")
# Alternatively, install just ggplot2:
install.packages("ggplot2")
# Or the development version from GitHub:
# install.packages("pak")
pak::pak("tidyverse/ggplot2")