Functions and Data for the Book, a Primer of Ecology with R

Provides data and functions for "A Primer of Ecology with R" by M. Henry H. Stevens (2009) .


primer

The goal of primer is to .maintain functions used in [Primer of Ecology Using R] (https://hankstevens.github.io/Primer-of-Ecology/)

Installation

You can install the released version of primer from CRAN with:

install.packages("primer")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("HankStevens/primer")

Example

Stochastic density-independent population dynamics.

library(primer)
#> Loading required package: deSolve
#> Loading required package: ggplot2

# random finite rates of increase
lambdas <- runif(10, .5, 1.5)

# stochastic dynamics
out <- PopSim(Rs=lambdas, years=50, N0=50)
matplot(0:50, out, type='l')

# distribution of final population sizes
summary(out[51,])
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>     1.0     1.5    14.0    41.3    64.5   192.0

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("primer")

1.2.1 by M. Henry H. Stevens, 4 months ago


Browse source code at https://github.com/cran/primer


Authors: M. Henry H. Stevens [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports graphics, stats

Depends on deSolve, ggplot2

Suggests bbmle, bipartite, cowplot, data.table, diagram, DiagrammeR, DiagrammeRsvg, igraph, lavaan, magrittr, nlme, vegan, reshape2, rARPACK, rsvg


See at CRAN