raoperms: raoperms

View source: R/RcppExports.R

raopermsR Documentation

raoperms

Description

C++ function used by phy_or_env_spec(). Not meant for use otherwise.

Usage

raoperms(
	p,
	D,
	n_sim=1000,
	seed=12345)

Arguments

p

numeric vector of length n. A species weights vector.

D

numeric vector of length n(n-1)/2. i.e. a dist object representing the lower triangle of an nxn matrix.

n_sim

integer. number of sims to do (default: 1000).

seed

integer. a seed to be used for permutation. setting seed=0 will give nondeterministic random results, as if no seed were set (default: 0).

Value

Vector of Rao values, length = n_sim.

Author(s)

John L. Darcy

Examples

  # library(specificity)
  # p <- runif(100) 
  # D <- dist(runif(100))
  # a <- raoperms(p,D,100,12345)
  # hist(a)

darcyj/specificity documentation built on Aug. 1, 2023, 8 a.m.