metasim.disturbance: A metacommunity simulation for ecologists

View source: R/metasim.disturbance.R

metasim.disturbanceR Documentation

A metacommunity simulation for ecologists

Description

Wrapper function for MCSim::metasim, sends landscape list and interval duration list, along with other metasim parameters that will be fixed across all simulations

Usage

metasim.disturbance(scenario.name, landscape.list, time.interval.durations)

Arguments

scenario.name

text string naming the scenario

landscape.list

list of landscapes to run in series

time.interval.durations

vector of integers representing the number of timesteps to use for each landscape in the landscape_list, MUST be same length as landscape_list

J.t0.initial

Initial species abundance matrix for timestep "t0"

scenario_name

DEPRECATED: use scenario.name

landscape_list

DEPRECATED: use landscape.list

time_interval_durations

DEPRECATED: use time.interval.durations

J.t0_initial

Deprecated: use J.t0.initial

...

parameters sent to metasim()

Examples

## Not run: 
set.seed(1234) #set random seed

# make a landscapes
my.landscape.1 <- make.landscape(
  site.coords = data.frame(
    x = c(1, 2, 3, 4, 5),
    y = c(1, 3, 1, 5, 2)),
  Ef = c(-.8, -.6, 0, .25, .9),
  m = 0.5,
  JM = 10000)

my.landscape.2 <- make.landscape(
  site.coords = data.frame(
    x = c(1, 2, 3, 4, 5),
    y = c(1, 3, 1, 5, 2)),
  Ef = c(-.8, -.6, 0, 0, 0),
  m = 0.5,
  JM = 10000)

# niche positions, niche breadths, and relative abundances for three species
niche.positions <-  c(-.5, 0, .5)
niche.breadths <- c(.2, .2, 5)
regional.rel.abund <- c(.8, .1, .1)

sim.result <- metasim.disturbance(
  scenario.name = "niche_shift",
  landscape.list = list(my.landscape.1,my.landscape.2),
  time.interval.durations = c(10,10),
  trait.Ef = niche.positions,
  trait.Ef.sd = niche.breadths,
  gamma.abund = regional.rel.abund,
  W.r = 0,
  nu = 0.001,
  output.dir.path = "my_disturbance_sim_output_directory")

## End(Not run)

sokole/MCSim documentation built on April 2, 2022, 5:43 a.m.