randPatPar: Random Patterns spatial permutation algorithm

View source: R/vario.R

randPatParR Documentation

Random Patterns spatial permutation algorithm

Description

A convience function for working with randPat which calls the .C function 'randpatpar'. This function allows you to specify the number of processors to run on adding processsors only helps if working with many species as each species is evaulated on a different processor. Returns a (5+(n+2)^2) x S matrix, the first five rows of which are species index, phi strata stat, number of strata swaps, phi pixel swap, and number of pixel swaps, and then the remaining rows are the presences/abundances in the randomized occurances

Usage

randPatPar(
  psp,
  nstrata,
  mtrials1 = 1000,
  mtrials2 = 1e+06,
  alpha = 0.01,
  npar = 1
)

Arguments

psp

multidimenstional S x (n+2) x (n+2) array

alpha

the cutoff value for the phi statistic of Roxburgh and Chesson 1998

npar

the number of processors to run the code on

n

the size of the orginal 2-D array along one spatial axis (i.e., without extra rows and columns)

pl

the places in rpsp that can be swaped

mtrials

the numbef of times to attempt a swap


mcglinnlab/vario documentation built on Feb. 22, 2023, 1:49 p.m.