Description Usage Arguments Value
When x
is a distance matrix or correlation matrix (symmetric with diagonal elements equal to 0 or 1,
respectively), squareform()
vectorizes this matrix (i.e., "unwraps" or "flattens") into a vector (i.e., vec->mat).
When x
is a vector (i.e., a distance matrix or correlation matrix) squareform()
reshapes this vector
into the correspoding square matrix (i.e., mat->vec).
1 | squareform(x, lt = TRUE, corr = FALSE, nms = NULL)
|
x |
square matrix or vector |
lt |
boolean, is only the lower-triangle (TRUE) or full matrix (all values) of interest?
For |
corr |
boolean (defaults to FALSE, for distance matrices), defines the value of diagonal elements |
nms |
optional (applicable only when vec->mat), character vector that holds names of rows/cols of output matrix |
square matrix or vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.