knitr::opts_chunk$set( collapse = TRUE, message = FALSE, fig.width = 5, fig.retina = 2, comment = "#>" )
library(mysimplecompendium)
library(tidyverse) library(here) starwars %>% mutate(gender_fct = fct_infreq(gender)) %>% ggplot(aes(gender_fct)) + geom_bar() + xlab("") + theme_minimal(base_size = 14)
In Figure \@ref(fig:starwars-gender-plot) we can see that there is an imbalance in the gender ratios of Starwars characters. This needs to be fixed.
We can put anything in /vingettes
, such as data files:
my_data <- read_csv(here("vignettes/my-data.csv"))
And R script files:
source(here("vignettes/my-script.R")) plus_two(my_data$a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.