fish_age | R Documentation |
Samples of 50 Tobis fish, or Sand Eels, were collected at three different locations in the North Sea and the number of one-year-old fish were counted.
fish_age
A data frame with 300 rows and 3 variables:
Year the fish was caught with levels 1997 and 1998.
Site the fish was caught with levels A, B and C.
Is the fish one-year-old, yes or no?
Henrik Madsen, Paul Thyregod. 2011. Introduction to General and Generalized Linear Models CRC Press. Boca Raton, FL. ISBN: 978-1-4200-9155-7 Website
library(dplyr)
library(tidyr)
# Count the number of one-year-old fish at each location.
fish_age |>
filter(one_year_old == "yes") |>
count(year, location) |>
pivot_wider(names_from = location, values_from = n)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.