Learn R Programming

DSpat (version 0.1.6)

simCovariates: Simulates covariates for an example in DSpat

Description

Create a set of covariates in a 100x100 world with a vertical linear feature and discrete habitats.

Usage

simCovariates(hab.range=30, probs=c(1/3,2/3), river.loc=50)

Arguments

hab.range
habitat range that controls patchiness
probs
ordered probablities that define habitat cutoffs
river.loc
x coordinate for north-south river location

Value

Details

The number of habitat types is the length of probs plus 1. The habitats are stored as a numeric from 1 to the number of types, but should be fitted with habitat as a factor variable. The distance to the river is a scaled distance from 0 to 1.

See Also

simPts

Examples

Run this code
covariates = simCovariates(hab.range=50, probs=c(1/3,2/3,7/8))

Run the code above in your browser using DataLab