#' Simulates QQ-plots with the given data.
#'
#' @author OpenIntro
#' @export
qqnormsim <- function(dat){
par(mfrow = c(3,3))
qqnorm(dat, main = "Normal QQ Plot (Data)")
qqline(dat)
for(i in 1:8){
simnorm <- rnorm(n = length(dat), mean = mean(dat), sd = sd(dat))
qqnorm(simnorm,main = "Normal QQ Plot (Sim)")
qqline(simnorm)
}
par(mfrow = c(1,1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.