View source: R/morpho.utilities.R
get.contrast.matrix | R Documentation |
Creates a contrast matrix using the observed character states in an input matrix.
get.contrast.matrix(matrix)
matrix |
a discrete morphological character matrix. |
Thomas Guillerme
check.morpho
## A random multistate matrix random_matrix <- matrix(sample(c(0,1,2), 100, TRUE), 10, 10) ## Get the contrast matrix get.contrast.matrix(random_matrix) ## Adding inapplicable and missing data to the matrix random_matrix[sample(1:100, 10)] <- "?" random_matrix[sample(1:100, 10)] <- "-" ## Get the contrast matrix get.contrast.matrix(random_matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.