Description Usage Format Examples
From a study on whether yawning is contagious https://www.imdb.com/title/tt0768479/. The data here was derived from the final proportions of yawns given in the show.
1 |
A data frame of 50 rows representing each of the 50 participants in the study.
integer value corresponding to identifier variable of subject ID
string of either "seed"
, participant was shown a
yawner, or "control"
, participant was not shown a yawner
string of either "yes"
, the participant yawned, or
"no"
, the participant did not yawn
1 2 3 4 5 6 7 8 9 | library(ggplot2)
# Plot both variables as a stacked proportional bar chart
ggplot(mythbusters_yawn, aes(x = group, fill = yawn)) +
geom_bar(position = "fill") +
labs(
x = "", y = "Proportion",
title = "Proportion of yawn and not yawn for each group"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.