This is an example to show how to write a R Markdown document.
First I’ll load the packages and the data (from the web).
library(dplyr)
library(ggplot2)
surveys <- read.csv("https://kbroman.org/datacarp/portal_clean.csv")
The data has 30652 rows and 13 columns.
Here’s a scatterplot of hindfoot length vs weight:
ggplot(surveys, aes(x=weight, y=hindfoot_length)) +
geom_point()
Here are the first few lines of the data, for some selected columns:
surveys %>% select(species_id, weight, hindfoot_length) %>% head()
## species_id weight hindfoot_length
## 1 NL 204 32
## 2 NL 199 34
## 3 NL 197 32
## 4 NL 166 33
## 5 NL 184 32
## 6 NL 206 32