simCovariates {DSpat}R Documentation

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

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.

Value

dataframe with columns x,y,river and habitat

Author(s)

Devin Johnson; Jeff Laake

See Also

simPts

Examples

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

[Package DSpat version 0.1.0 Index]