# ============================================================
# Installing & Loading Packages
# R Foundations — Rverse Analytics
# https://rverseanalytics.com/learn/packages
# ============================================================

# R ships with base packages; thousands more live on CRAN.
# Install a package ONCE (in your own R):
# install.packages("dplyr")
# Load a package each session to use its functions.
# MASS ships with R, so we can load it right away:
library(MASS)
head(Boston[, c("medv", "rm", "age")])   # a dataset from MASS
# Now MASS's datasets and functions are available
hist(Boston$medv, col = "#2f6fed",
     xlab = "Median home value ($1000s)", main = "Boston housing")
# Use one function without attaching the whole package: pkg::fun
MASS::fractions(0.75)
(.packages())   # which packages are attached now
