R can be extended almost infinitely with packages: add-ons that folks have contributed that do specific things.
Packages can be found in a variety of ways.
CRAN Lists all the packages, as well as different collections that work on different subject areas.
Many articles will cite the R packages they used.
Search for ‘R package’ and whatever task you are trying to accomplish.
RStudio has its’ own collection of packages: https://www.rstudio.com/products/rpackages/
Various websites maintain different collections of packages.
e.g., https://awesome-r.com/
Packages can be installed from within RStudio, under the ‘packages’ pane.
Alternatively, you can install them with the install.packages()
function from within the console. Note the quotes.
install.packages('lme4')
For every version of R, you only need to install a package once.
However, in each R session, you will need to load these packages using the library()
function. Note the lack of quotes.
library(lme4)
General overview here
Both these packages have good overviews and examples.
ggplot2 is a powerful graphics language that translates models and data structure into graphics.
It can be complex to learn and use.
Lattice improves on the default plotting options of base R, and can be useful for multivariate data and multi-panel plots with data conditioned on other data.