build_param {cxr}R Documentation

Build param structure

Description

Builds a nested list for the parameters of a given metapopulation

Usage

build_param(sp, sites, rates, env, num.params = NULL)

Arguments

sp

character vector with species names

sites

character vector with site names

rates

character vector, vital rate names

env

boolean, whether environment is accounted for

num.params

optional, integer giving the number of parameters to account for. If not specified, it will include environment interactions with all species densities. E.g. if 3 sp and env = TRUE, there will be 7 params (intercept + 6 betas)

Value

nested list of the form 'list[[sp]][[site]]'. Each of these elements is a NA matrix with vital rates in rows and expected parameters in columns.

Examples

sp <- c("s1","s2","s3")
sites <- c("sa","sb")
rates <- c("Sj","Sn","Sr","Rn","Rr","D","O")
env <- TRUE
param <- build_param(sp = sp,sites = sites,rates = rates,env = env)

[Package cxr version 1.1.1 Index]