View source: R/internal_assignment.R
| internal_assignment | R Documentation |
Given a phytosociological table and a partition of its columns, this function checks the internal assignment of relevés to groups, based on the presence of taxa that are exclusive to each group (or group combination) as defined by the partition, distinguishing relevés assigned unambiguously to their group from those for which there is ambiguity.
internal_assignment(m_bin, p)
m_bin |
A matrix. A phytosociological table of 0s (absences) and 1s (presences), where rows correspond to taxa and columns correspond to relevés. |
p |
A vector of integer numbers with the partition of the relevés (i.e.,
a k-partition, consisting in a vector with values from 1 to k, with length
equal to the number of columns of |
The function accepts a phytosociological table (m_bin) and a
k-partition of its columns (p), and assesses which relevés are assigned
unambiguously to their group and which are not.
The assignment of a relevé to a group is considered unambiguous when
transferring it to another group would alter the pattern of differential
taxa defined by p. Conversely, if a relevé could be moved to a different
group without changing this pattern, its assignment is considered
ambiguous.
A list with the following components:
A vector containing the names of the relevés with ambiguous assignment.
A data frame with all the possible assignments for the ambiguously assigned relevés.
The internal assignment precision (IAP), i.e., the proportion of relevés with unambiguous assignment.
The internal assignment ambiguity (IAA), i.e., the proportion of relevés with ambiguous assignment (IAA = 1 - IAP).
Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.
# Getting the Taxus baccata forests data set
data(taxus_bin)
# Creating some group partitions
groups1 <- rep(c(1, 2, 3), c(3, 11, 19))
set.seed(1)
groups2 <- sample(rep(c(1, 2, 3), c(3, 11, 19)))
# In this case, all relevés are unambiguously assigned to a group
internal_assignment(taxus_bin, groups1)
# In this other case, some relevés could be moved to a different group, as
# their assignment is ambiguous
internal_assignment(taxus_bin, groups2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.