locations: Extract Gradient Locations

Description Usage Arguments Value Author(s) Examples

Description

Extract the gradient locations at which response curves were evaluated or for which counts were simulated.

Usage

1
2
3
4
locations(x, ...)

## Default S3 method:
locations(x, ...)

Arguments

x

an object with locations as an attribute or a component, such as the object returned by coenocline.

...

arguments passed to other methods.

Value

A vector or a matrix of gradient locations. For single-gradient simulations, a vector is returned, whereas for two-gradient simulations, a matrix of location pairs is returned.

Author(s)

Gavin L. Simpson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Poisson counts along a single gradient, Gaussian response
## =========================================================

x <- seq(from = 4, to = 6, length = 100)
opt <- c(3.75, 4, 4.55, 5, 5.5) + 0.5
tol <- rep(0.25, 5)
h <- rep(20, 5)

## simulate
set.seed(1)
y <- coenocline(x, responseModel = "gaussian",
                params = cbind(opt = opt, tol = tol, h = h),
                countModel = "poisson")
head(locations(y))

coenocliner documentation built on Feb. 14, 2021, 5:06 p.m.