A population of fish we’re interested in has four life stages: eggs (E), fry (F), juvenile (J), breeding adult (A). You are given the following:
With your group, draw the Leslie matrix model for this population structure.
With your group, given an initial population (Year 0) that has 0 eggs, 40,000 fry, 600 juveniles, and 450 adults, by hand project the population structure (i.e. the count in each life stage) in Year 1.
Fork and clone this repo, which contains the Leslie matrix for the example above.
Explore the code and outputs. Does the Year 1 population projection align with what you calculated?
Add code to the .Rmd to expand the projections to years 4, 5, and 6 (it current projects through year 3)
Using the command line: Save, stage, commit, then push your changes.
r-exploring
usethis::use_git()
and then
usethis::use_github()
tidyverse
, skimr
, and
GGally
packages in the setup code chunkView(diamonds)
in the Console to look at the
built-in diamonds
dataset in Rnames()
,
dim()
, summary()
, head()
,
tail()
, and skimr::skim()
ggpairs()
ggplot
scatterplot of diamond price
(price
) as a function of size (carat
)carat
column (recall: a histogram only requires a single
variable, e.g. aes(x = carat)
)geom_box
) of diamond clarity (on
the x-axis) and price (y-axis).