Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rbind.popn

Combine popn Objects


Description

Form a single popn object from two or more existing popn objects, or a list.

Usage

## S3 method for class 'popn'
 rbind(..., renumber = TRUE)

Arguments

...

one or more popn objects

renumber

logical for whether row names in the new object should be set to the row indices

Details

An attempt to combine objects will fail if they conflict in their covariates attributes.

From secr 3.1 this is an S3 method and list input is not allowed.

Value

An object of class popn with number of rows equal to the sum of the rows in the input objects.

See Also

Examples

## generate and combine two subpopulations
trapobj <- make.grid()
p1 <- sim.popn(D = 3, core = trapobj)
p2 <- sim.popn(D = 2, core = trapobj)
covariates(p1) <- data.frame(size = rep("small", nrow(p1)))
covariates(p2) <- data.frame(size = rep("large", nrow(p2)))
pop <- rbind(p1,p2)

## or
pop <- do.call(rbind, list(p1,p2))

secr

Spatially Explicit Capture-Recapture

v4.4.1
GPL (>= 2)
Authors
Murray Efford
Initial release
2021-05-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.