landscape.new.switchparam: Create a set of boolean parameters

Description Usage Arguments Examples

View source: R/create_landscape.R

Description

Create a set of boolean (1 or 0) parameters for a Rmetasim landscape.

Usage

1
2
  ## must be called AFTER landscape.new.empty()
   landscape.new.switchparam(rland,re=0,rd=0,mp=1,dd=0)

Arguments

rland

skeletion of landscape object, required

re

randepoch (default=0), 1=randomly pick a new epoch (from the epochs listed in the landscape) after an epoch completes, 0=epochs are chosen in order

rd

randdemo (default=0), 1=randomly choose a demography (from the demographies listed in the landscape) for each subpopulation, 0=demographies are assigned in order

mp

multp (default=1), 1=multiple paternity,0=entire families from a single mating

dd

density dependence. If dd=1, then two of each local demography matrix must be defined, the first set using new.local.demo with k=0 and representing demography at low density and again with k=1 for demography at high population density.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  ## Defaults
  exampleland <- landscape.new.empty()
  exampleland <- landscape.new.switchparam(exampleland)
  exampleland$switchparam

  ## Random epochs, random demographies, and no multiple paternity
  exampleland <- landscape.new.empty()
  exampleland <- landscape.new.switchparam(exampleland,re=1,rd=1,mp=0)
  exampleland$switchparam

  rm(exampleland)

rmetasim documentation built on Feb. 8, 2020, 1:06 a.m.