knitr::opts_chunk$set( collapse = TRUE, comment = "#>", echo = FALSE, message = FALSE, warning = FALSE, fig.width = 5, fig.retina = 2 )
library(mysimplecompedium) library(dplyr) library(ggplot2)
knitr::read_chunk("my-script.R")
Due to the recently released Star Wars film, "Star Wars: The Rise of Skywalker: Expanded Edition", we will be analyzing the Star Wars data set, which is already loaded into dplyr and has:
Distribution of height of Star Wars characters:
ggplot(data = starwars, mapping = aes(x = height))+ geom_density()+ theme_bw()
We can see in Figure \@ref(fig:starwars-plot) a density plot of all the different heights of Star Wars characters.
IThere is an upcoming book that will adapt the events of the film, with some extended and unseen scences [@starwars9book].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.