# 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)
  })

Introduction

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"))

Methods

We fit a linear model with sepal width as a function of sepal length:

$$ SW = mSL + b $$

Results

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")

So what?

Yeah, that's about it.



jcvdav/startR documentation built on May 2, 2024, 8:30 p.m.