6.4 Optional: What packages come with base R?

If you want to see all of the packages that come with base R, do this. library() is a function you will use a lot.

.libPaths("") 
library()

One package that is part of this cannon is MASS, which stands for Modern Applied Statistics in S. “S” is the precursor to R, and MASS is the package that accompanies the book of the same name, which is one of the original books on S/R. (https://www.springer.com/us/book/9780387954578)

End optional section


6.4.1 Loading packages with the library() function

When a function is already downloaded to your computer, you explicitly load it into R’s working memory using the library() command.

library(MASS)

6.4.2 Preview: loading data from packages

Many packages have data. We can load data using the data() command.

data(crabs)

We plot data with the plot() command.

plot(FL ~ RW, data = crabs)