knitr::opts_chunk$set(echo = TRUE, message = F, warning = F, fig.height = 6, comment = "", c) options(knitr.duplicate.label = "allow") library(ggsample)
--
# knitr::include_graphics("applet.png")
--
--
--
r flipbookr::chunk_reveal('geom_point_lm_sample_7', title = '### geom_point_lm_sample')
r flipbookr::chunk_reveal('geom_point_lm_sample_7', title = '### geom_point_lm_sample', break_type = 7)
my_seed <- sample(1:100, 1) library(ggplot2) ggplot(data = cars) + aes(x = speed, y = dist) + geom_point() + geom_point_lm_sample(color = "darkred")
r flipbookr::chunk_reveal('facet_sample_2', title = '### facet_sample')
# mean from samples library(ggplot2) ggplot(data = cars) + aes(x = speed) + geom_rug(size = 2, alpha = .5, color = "magenta") + ggxmean::geom_x_mean(linetype = "dashed") + facet_sample(n_facets = 1, n_sampled = 20) + facet_sample(n_facets = 2, n_sampled = 20) + facet_sample(n_facets = 3, n_sampled = 20) + facet_sample(n_facets = 15, n_sampled = 20) + ggxmean::geom_x_mean_label()
r flipbookr::chunk_reveal('facet_sample_3', title = '### facet_sample')
# linear model from samples set.seed(1323) library(ggplot2) ggplot(data = cars) + aes(x = speed) + aes(y = dist) + geom_point(color = "olivedrab4") + ggxmean::geom_lm() + labs(caption = "Population are observations from cars correlation study dataset") + facet_sample(n_sampled = 8) + labs(title = "16 draws, each a random sample of 8 observations from the population") + labs(subtitle = "Depending on our particular random sample...") + ggxmean::geom_lm_formula()
r flipbookr::chunk_reveal('facet_scramble_5', title = '### facet_scramble')
library(ggplot2) set.seed(232) ggplot(data = cars) + aes(x = speed) + aes(y = dist) + geom_rug() + geom_point(color = "springgreen4", alpha = .75) + facet_scramble(n_facets = 1) + facet_scramble(n_facets = 2) + facet_scramble(n_facets = 3) + ggxmean::geom_lm() + facet_scramble(n_facets = 12) + labs(title = "Disassociating variables")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.