label_matrix2 | R Documentation |
Constructs a label adjacency matrix based on two sets of labels 'a' and 'b', creating edges depending on the 'type' parameter and the similarity function 'simfun'.
label_matrix2(
a,
b,
type = c("s", "d"),
simfun = NULL,
dim1 = length(a),
dim2 = length(b)
)
a |
A vector of labels for the first set of data points. |
b |
A vector of labels for the second set of data points. |
type |
A character specifying the type of adjacency matrix to create, either "s" for same labels or "d" for different labels (default: "s"). |
simfun |
A function to determine the similarity between the labels (default: NULL). If NULL, the function will use "==" for type "s" and "!=" for type "d". |
dim1 |
The dimension of the first set of data points (default: length(a)). |
dim2 |
The dimension of the second set of data points (default: length(b)). |
A label adjacency matrix with edges determined by the label relationships between 'a' and 'b' and the similarity function 'simfun'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.