Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit

Permalink
Good base to start lesson prep
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed May 22, 2024
1 parent 9de26cc commit dc7accc
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion prep/Preparation-RStudio.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ library(ratdat)
## Lessons Snippits

```{r}
install.packages("ggplot2")
#install.packages("ggplot2")
```

```{r}
Expand Down Expand Up @@ -50,3 +50,24 @@ ggplot(data = complete_old, mapping = aes(x = weight, y = hindfoot_length))
ggplot(data = complete_old, mapping = aes(x = weight, y = hindfoot_length)) +
geom_point()
```

```{r}
myplot <- ggplot(data = complete_old, mapping = aes(x = plot_type, y = hindfoot_length)) +
geom_jitter(aes(color = plot_type), alpha = 0.2) +
geom_boxplot(outlier.shape = NA, fill = NA)
myplot
myplot +
theme_bw() +
theme(axis.title = element_text(size = 14),
legend.position = "none",
panel.grid.major.x = element_blank()) +
labs(title = "Rodent size by plot type",
x = "Plot type",
y = "Hindfoot length (mm)",
color = "Plot type") +
facet_wrap(vars(sex), ncol = 1)
```

0 comments on commit dc7accc

Please sign in to comment.