get_char_matrix | R Documentation |
Obtains a character-state matrix from a nexml object
get_char_matrix(nex, otus_id = TRUE, states_as_labels = FALSE, verbose = FALSE)
nex |
a nexml object |
otus_id |
logical, default TRUE, return a column with the otus block id. |
states_as_labels |
logical, default FALSE, when TRUE returns states as labels instead of symbols.
One can also use |
verbose |
logical, default FALSE, If TRUE, messages informing about steps is printed. |
data.frame: The character-state matrix. The first column (taxa) contains taxon ids. The second column (otu) contains otu ids. When the otus_id parameter is TRUE the third column (otus) will contain otu block ids. The remaining columns are named for each anatomical label in the dataset and contain the associated state values.
get_char_matrix_meta()
to retrieve metadata for a nexml object.
# applied to a (synthetic) Ontotrace matrix:
nex <- get_ontotrace_data(taxon = c("Ictalurus", "Ameiurus"), entity = "fin spine")
get_char_matrix(nex, otus_id = FALSE)
# applied to a data matrix for a study
slist <- get_studies(taxon = "Ictalurus australis", entity = "fin spine")
nex <- get_study_data(slist$id[1])[[1]]
# for brevity show only 6 character data columns and first 5 rows
get_char_matrix(nex, otus_id = FALSE)[1:5,1:8]
# same, but states as labels (this can take a while)
get_char_matrix(nex, otus_id = FALSE, states_as_labels = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.