rao1sp: rao1sp

View source: R/RcppExports.R

rao1spR Documentation

rao1sp

Description

Calculate's Rao's quadratic entropy for one species (rao1sp = "rao one species").

Usage

rao1sp(
	p, 
	D, 
	perm=FALSE, 
	seed=0)

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.

perm

bool. Whether or not the permute order of p before calculating Rao (default: FALSE).

seed

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

Value

A single Rao value.

Author(s)

John L. Darcy

Examples

  # library(specificity)
  # p <- 1:5/sum(1:5)
  # D <- dist(6:10)
  # rao1sp(p, D)

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