R package containing datasets used for Mango Solutions training courses and for the book SAMS Teach Yourself R in 24 Hours.
For the latest development version use remotes:
remotes::install_github("mangothecat/mangoTraining")
For the stable CRAN release:
install.packages("mangoTraining")
To view all datasets within the package:
data(package = "mangoTraining")
Then just load in the package and use any of the data sets:
library(mangoTraining)
head(demo_data, 3)
Subject Sex Age Weight Height BMI Smokes
1 1 M 43 57 166 20.7 No
2 2 M 22 71 179 22.2 No
3 3 F 23 72 170 25.1 No
Since version 1.1 there have been updates to the naming conventions of the package to align with tidyverse guidelines (i.e. using snake_case); old camelCase names for data/functions are still included to allow for backwards compatibility with the book.
For example, you can use both demo_data
and demoData
for the same dataset:
head(demoData, 3) # old name format
Subject Sex Age Weight Height BMI Smokes
1 1 M 43 57 166 20.7 No
2 2 M 22 71 179 22.2 No
3 3 F 23 72 170 25.1 No