K_func: Carrying Capacity Landscape Function (R version)

Description Usage Arguments Value

View source: R/trait_pop_sim.R

Description

Carrying capacity function written in R, mostly for visualization or testing purposes. Returns the value of the carrying capacity landscape at coordinate xi.

Usage

1
2
3
4
K_func(xi, h0 = 1, sig0i = c(5, 5), P0i = c(1.5, 1.5), hz = c(1, 1),
  biz = matrix(c(-1, -1, 1, 1), nrow = 2, ncol = 2), sigiz = matrix(c(1, 1,
  1, 1), nrow = 2, ncol = 2), Piz = matrix(c(1, 1, 1, 1), nrow = 2, ncol = 2),
  a = 0.1)

Arguments

xi

X values to evaluate under carrying capacity function; a vector of length d, where d is the number of dimensions of the landscape

h0

Total maximum height of the carrying capacity landscape

sig0i

Total width of landscape in all dimensions; determines how far from zero the carrying capacity drops off to nearly zero; vector of length d

P0i

Total super-gaussian parameter; determines how quickly or gradually the carrying capacity drops off near the landscape borders in each dimension. Higher values give more extreme drop-offs; vector of length d

hz

Maximum height of each of u peaks in the landscape; vector of length u

biz

Centre of each of u peaks in the landscape for each of d dimensions; matrix of dimension d by u

sigiz

Width of each of u peaks for each of d dimensions; matrix of length d by u

Piz

Super-gaussian parameter for each of u peaks for each of d dimensions; matrix of dimension d by u

a

Minimum values of carrying capacity within landscape limits

Value

Value of carrying capacity at coordinates xi


rdinnager/nichefillr documentation built on Dec. 3, 2019, 7:13 a.m.