Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
````md
---
title: "Penguins"
date: 2020-08-11
output: html_document
params:
species: Adelie
---
```{r setup, include = FALSE}`r ''`
library(tidyverse)
library(palmerpenguins)
smaller <- penguins %>%
filter(species == params$species,
!is.na(body_mass_g))
```
We have data about `r knitr::inline_expr("nrow(penguins)")` penguins. Only
`r knitr::inline_expr("nrow(penguins) - nrow(smaller)")` are classified as
`r knitr::inline_expr("params$species")`. The distribution of the
`r knitr::inline_expr("params$species")` penguins are shown below:
```{r, echo = FALSE}`r ''`
smaller %>%
ggplot(aes(body_mass_g)) +
geom_histogram(binwidth = 100)
```
````
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment