subset_PAM: Subset PAM according to selected sites

Description Usage Arguments Value Examples

View source: R/reduce_pam.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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")

biosurvey documentation built on Sept. 16, 2021, 1:07 a.m.