Two ways to install packages in R/Rstudio

Example package: beepr

  1. We use the install.packages() function. The basic format is: install.packages("package_name")

So to install the beepr package, the command is:

install.packages("beepr")
  1. Through the RStudio packages panel: