View source: R/weights_from_vector.R
weights_from_columns | R Documentation |
Provides a helper function for generating weight matrices
weights_from_columns(membership_columns)
membership_columns |
columns containing group memberships |
sparse weight/indicator matrix of type Matrix::dgCMatrix
a <- cbind(
c("k", "k", "l", NA, "m"),
c("l", "m", "k", "m", "k"),
c("m", NA, "m", NA, NA)
)
Wa <- weights_from_columns(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.