# Set some options knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE, fig.width = 5, fig.height = 3) # Load some packages suppressPackageStartupMessages({ library(startR) library(here) library(ggplot2) })
In this awesome manuscript, we show that there is a correlation between sepal length and sepal width for three species of Iris spp.. The three species are:
iris <- read.csv(file = here("raw_data", "iris.csv"))
We fit a linear model with sepal width as a function of sepal length:
$$ SW = mSL + b $$
Figure \@ref(fig:plot) shows that larger petals are lighter.
ggplot(data = iris, mapping = aes(x = Sepal.Length, y = Sepal.Width)) + geom_point(mapping = aes(color = Species)) + geom_smooth(method = "lm") + ggtheme_plot() + labs(x = "Sepal Length (cm)", y = "Sepal Width (gr)") + scale_color_brewer(palette = "Set1")
Yeah, that's about it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.