Learn R Programming

dispRity (version 1.5.0)

extract.dispRity: Extracting disparity values.

Description

Extracts the disparity from a dispRity object.

Usage

extract.dispRity(
  data,
  subsets,
  observed = TRUE,
  rarefaction = FALSE,
  concatenate = TRUE
)

Arguments

data

A dispRity object containing disparity results.

subsets

Optional, a numeric or character for which subsets to get (if missing, the value for all subsets are given).

observed

A logical value indicating whether to output the observed (TRUE (default)) or the bootstrapped values (FALSE).

rarefaction

Optional, a single numeric value corresponding to the rarefaction level (as the number of elements; if missing, the non-rarefied values are output).

concatenate

When the disparity metric is a distribution, whether to concatenate it (TRUE; default) or to return each individual metric.

See Also

dispRity, get.subsets.

Examples

Run this code
# NOT RUN {
## Load the disparity data based on Beck & Lee 2014
data(disparity)

## Extracting the observed disparity
extract.dispRity(disparity)

## Extracting the bootstrapped disparity
boot_disp <- extract.dispRity(disparity, observed = FALSE)
str(boot_disp)
## Or only the rarefied (5) data
boot_disp_rare <- extract.dispRity(disparity, observed = FALSE,
     rarefaction = 5)

# }

Run the code above in your browser using DataLab