coenocliner: Coenocline Simulation

> library(coenocliner)
This is coenocliner 0.2-0

Attaching package: 'coenocliner'

The following object is masked from 'package:Matrix':

    expand

バージョン: 0.2.0


関数名 概略
coenocline Simulate species abundance (counts) or occurrence along one or two gradients
coenocliner A coenocline simulation package for R
distributions Wrappers to random number generators for use with coenocliner
expand An 'expand.grid'-like function that repeats sets of vectors for every value in a reference vector.
locations Extract Gradient Locations
persp.coenocline Perspective Plot of Species Simulations Along Gradients
plot.coenocline Plot species simulations along gradients
showParams List parameters of species response models
simJamil Simulate species abundance data following Jamil & ter Braak (2013)
species-response Species response models for coenocline simulation
stack.coenocline Stack columns of a species coenocline simulation

coenocline

Arguments

  • x
  • responseModel
  • params
  • extraParams
  • countModel
  • countParams
  • expectation
> 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(y)
     [,1] [,2] [,3] [,4] [,5]
[1,]    9    3    0    0    0
[2,]   17    8    0    0    0
[3,]   18    4    0    0    0
[4,]   16    5    0    0    0
[5,]   21    5    0    0    0
[6,]   19    4    0    0    0

distributions

> coenocliner:::ZIP(n      = 10, 
+                   mu     = 2, 
+                   zprobs = 0.6)
 [1] 1 0 0 0 0 0 0 0 0 2