dsm_mask | R Documentation |
This function will subsitute NAs in the off diagonal elements of a dissimilarity matrix. Will output melted matrix for convienent ggploting, or can simply mask an existing matrix.
dsm_mask(dsm, lower = FALSE, melt = TRUE)
dsm |
a single matrix |
lower |
logical indicating selection of lower or upper diagonal |
melt |
logical indicating whether or not to melt the matrix into a data frame |
Robert S. Chavez
cars_dsm <- 1-cor(mtcars) dsm_mask(cars_dsm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.