Created
August 27, 2021 19:26
-
-
Save jthomasmock/771853602d5b15662a36eca237e2113d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
````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