Learn R Programming

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

Copy Link

Version

Install

install.packages('primer')

Monthly Downloads

774

Version

1.2.0

License

GPL-3

Maintainer

Last Published

January 6th, 2021

Functions in primer (1.2.0)

MetaSim

Simulation of Stochastic Metapopulation Models
SIRf

The S-I-R Epidemilogical Disease Model with Frequency Dependent Transmission
SIRmod

The S-I-R Epidemilogical Disease Model
SIRbd

The S-I-R Epidemilogical Disease Model with Births and Deaths
SIRd

The S-I-R Epidemilogical Disease Model
LVCompGames

Lotka-Volterra Competition Games
coneflowerrecruits

Smooth coneflower new recruits
BSsucc

Secondary succession data
cat_function

A Cat Function
PopSim

Population Simulator
ClostExp

Closterium Population Data
gotelli

Propagule Rain Metapopulation Model
thetalogistic

Continuous Theta-Logistic Growth
levins

Classic Metapopulation Model
lvcomp2

Two Species Lotka-Volterra Competition
chesson

Two-species model of the storage effect
weeds

Percent cover of six perennial herbaceous plants
pimmlawton

Analysis of Jacobian Lotka-Volterra Food Web Matrices
hanski

Core-satellite Metapopulation Model
plot_f

plot_f
lvcomp3

Three Species Lotka-Volterra Competition
compcol

Two-species Competition-colonization Metapopulation Model
igp

A Lotka-Volterra Model of Intraguild Predation
clogistic

Continuous Logistic Growth
alogistic

Logistic growth with the Allee effect
CandG

Data drawn approximately from Collins and Glenn (1991)
bip_stability

Bipartite network properties
lande

A Metapopulation Model with Habitat Destruction
lvcompg

A General Lotka-Volterra Competition Model
compcolM

Multi-species Competition-colonization Model, With Habitat Destruction
moths

Moth Species Richness
predpreyLV

The Lotka-Volterra Predator-prey Model
predpreyRM

Rosenzweig-MacArthur Predator-prey Model
one_over_f

Function to generate 1/f noise.
dlogistic

Discrete Logistic Growth
coneflower

Smooth coneflower data
dlvcomp2

Discrete Logistic Competition
ross

Weekly deaths from bubonic plague in Bombay in 1905--06
primer-package

Functions and data for "A Primer of Ecology with R"
coneflowerseeds

Smooth coneflower seed data
sparrows

Song Sparrow Data Set
scheffer

A resource-based model of alternative stable states
spec_mimic

Function to mimic the power spectrum of an observed time series.
succniche

A Four-state model of Successional Dynamics