build_param: Build param structure

View source: R/build_param.R

build_paramR 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)

cxr documentation built on Oct. 27, 2023, 1:08 a.m.