Datasets

Want to learn more? I recommend working through: R for Data Science, R Cookbook, and R Graphics Cookbook.

# view built-in datasets
data()
# view all installed datasets from all installed packages
data(package = .packages(TRUE))
Warning message:
In data(package = .packages(TRUE)): datasets have been moved from package 'base' to package 'datasets'Warning message:
In data(package = .packages(TRUE)): datasets have been moved from package 'stats' to package 'datasets'
# load a dataset "votes.repub" from the installed package "cluster"
data("votes.repub", package = "cluster")