simulate_niche: Simulate niche

View source: R/simulate_niche.R

simulate_nicheR Documentation

Simulate niche

Description

Simulates a niche object of class NINA from a former niche or a matrix of environmental coordinates. The function uses ecospat.grid.clim.dyn from ecospat R package to generate the niche object

Usage

simulate_niche(
  z,
  use.whole.env = F,
  method = 1,
  glob = NULL,
  glob1 = glob,
  sample.size = nrow(glob) * 0.1,
  R = 100
)

Arguments

z

m by n matrix indicating the association coefficient (-1 to 1). m are species to be modeled as rows and n interactions as columns

use.whole.env

Logical. Sample from the entire environmental space

method

NINA EN model object for species group two

glob

n by n matrix indicating the competition coefficient between interactions (0 to 1).

glob1

NINA EN model object for species group one

sample.size

String indicating whether to perform at a region or a global level. Note that if models have not been estimated at a region level and it is selected it will produce an error

R

Numeric value indicating independence from biotic associations. Value must be comprised between 0 and 1.

Details

It needs either z or glob arguments to run, otherwise will throw an error

Value

niche object class NINA

Examples

## Not run: 
z <- simulate_niche(glob = cbind(rnorm(100), rnorm(100)))

## End(Not run)


agarciaEE/NINA documentation built on Jan. 9, 2025, 10:09 a.m.