An internal function that operate within CMRnet::DatastreamPermSoc

cmrPermSoc(
  D,
  locmat,
  same.time,
  time.restrict,
  same.spat,
  spat.restrict,
  n.swaps,
  n.rand,
  burnin,
  n.burnin,
  buffer = 0
)

Arguments

D

The input dataset to be randomised

locmat

A matrix indicating whether distance between the capture locations is less than spat.restrict if not "n"

same.time

(TRUE/FALSE) Whether swaps should be restricted to only occur betwen individuals trapped on the same date or not

time.restrict

Provided as a number of months. Imposes time restrictions on when swaps can take place so that individuals can only be swapped with those a fixed time before or after being captured

same.spat

(TRUE/FALSE) Whether swaps should be restricted to only occur between individuals trapped at the same location

spat.restrict

Provided on the same scale as the coordinates in the input dataset. Imposes space restrictions on when swaps can take place so that individuals can only be swapped with those captued within a fixed distance

n.swaps

The number of swaps between each random network being extracted (e.g. n.swaps = 10 would equate to 10 swaps taking place between each random network being saved)

n.rand

The number of randomised networks to be generated

burnin

(TRUE/FALSE) Whether burnin is required

n.burnin

The number of swaps to discard as burn-in before the first random network is created. The total number of swaps conducted is thus n.burnin+n.swaps*n.rand

buffer

The number of days around a capture event that an individual can't be swapped into. Defaults to zero. This exists for when trapping schedules would prevent an individual trapped on one day being trapped on adjacent days

Value

A randomised dataset with the same dimensions as the original input dataset