convert_pair_matrix_str | R Documentation |
Convert paired cluster comparison values to a matrix
convert_pair_matrix_str(pair.str, l = NULL, directed = FALSE)
l |
labels for columns. Default is NULL, which will compute them from names(pair.num) |
directed |
If FALSE (default), the first value in each split will be used as columns, with the second as rows. If TRUE, first values will be rows, and second will be columns. |
pair.num |
a vector of values with names of compared elements separted by "_", e.g. "c1_c2", "c23_c59" |
a matrix containing values from pair.num, and named for each element separated by "_" in names(pair.num)
pair_values <- seq(1,27,3)
names(pair_values) <- paste(rep(letters[1:3], each = 3), rep(letters[1:3], 3), sep = "_")
pair_values
pair_matrix <- convert_pair_matrix(pair_values, directed = FALSE)
pair_matrix
pair_matrix <- convert_pair_matrix(pair_values, directed = TRUE)
pair_matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.