Description Usage Arguments Value Author(s) Examples
A simple S3 persp
method for coenocline simulations.
1 2 |
x |
an object of class |
species |
vector indicating which species to plot. This can be any vector that you can use to subset a matrix, but numeric or logical vectors would be mostly commonly used. |
theta, phi |
angles defining the viewing direction. |
... |
additional arguments to |
A plot is drawn on the current device.
Gavin L. Simpson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## Poisson counts along two correlated gradients, Gaussian response
## ================================================================
set.seed(1)
N <- 40
x1 <- seq(from = 4, to = 6, length = N)
opt1 <- seq(4, 6, length = 5)
tol1 <- rep(0.25, 5)
x2 <- seq(from = 2, to = 20, length = N)
opt2 <- seq(2, 20, length = 5)
tol2 <- rep(1, 5)
h <- rep(30, 5)
xy <- expand.grid(x = x1, y = x2)
set.seed(1)
params <- list(px = list(opt = opt1, tol = tol1, h = h),
py = list(opt = opt2, tol = tol2))
y <- coenocline(xy,
responseModel = "gaussian",
params = params,
extraParams = list(corr = 0.5),
countModel = "poisson")
## perspective plot(s) of simulated counts
layout(matrix(1:6, ncol = 3))
op <- par(mar = rep(1, 4))
persp(y)
par(op)
layout(1)
## as before but now just expectations
y <- coenocline(xy,
responseModel = "gaussian",
params = params,
extraParams = list(corr = 0.5),
countModel = "poisson",
expectation = TRUE)
## perspective plots of response curves
layout(matrix(1:6, ncol = 3))
op <- par(mar = rep(1, 4))
persp(y)
par(op)
layout(1)
## Same plots generated using the `plot` method
layout(matrix(1:6, ncol = 3))
op <- par(mar = rep(1, 4))
persp(y)
par(op)
layout(1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.