knitr::opts_chunk$set(echo = TRUE, warning=FALSE) suppressWarnings(suppressMessages(suppressPackageStartupMessages(library(ggplot2))))
This example is adapted from data supplied by https://www.statcan.gc.ca.
The weights (to the nearest tenth of a kilogram) of 30 students were measured and recorded as follows:
dat <- c(59.2, 61.5, 62.3, 61.4, 60.9, 59.8, 60.5, 59.0, 61.1, 60.7, 61.6, 56.3, 61.9, 65.7, 60.4, 58.9, 59.0, 61.2, 62.1, 61.4, 58.4, 60.8, 60.2, 62.7, 60.0, 59.3, 61.9, 61.7, 58.4, 62.2)
library(statshelpR) print(stem_leaf_plot(dat))
Note the location of the decimal in this example. The numbers beyond the vertical bar are the values in tenths of kg.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.