subset_PAM {biosurvey}R Documentation

Subset PAM according to selected sites

Description

Subsets of a base_PAM object according to survey sites contained in a master_selection object.

Usage

subset_PAM(base_PAM, master_selection, selection_type = "all")

Arguments

base_PAM

object of class base_PAM obtained using the function prepare_base_PAM.

master_selection

object of class master_selection. This object can be obtained using the functions: random_selection, uniformG_selection, uniformE_selection, or EG_selection.

selection_type

type of selection to be considered to subset base_PAM. Options are: "all", "random", "E", "G", and "EG". The default, "all", uses all selection types present in master_selection.

Value

An object of class PAM_subset containing the original base_PAM and other subsets of the PAM according to selection_type.

Examples

# Data
data("b_pam", package = "biosurvey")
data("m_selection", package = "biosurvey")

# Subsetting base PAM according to selections
## only uniform in G
sub_pam_G <- subset_PAM(b_pam, m_selection, selection_type = "G")

## All at the time
sub_pam_all <- subset_PAM(b_pam, m_selection, selection_type = "all")

[Package biosurvey version 0.1.1 Index]