bless_weitrix {weitrix} | R Documentation |
Set metadata entries in a SummarizedExperiment object so that it can be used as a weitrix.
bless_weitrix(object, x_name, weights_name)
object |
A SummarizedExperiment object. |
x_name |
Name of the assay containing the observations. |
weights_name |
Name of the assay containing the weights. |
A SummarizedExperiment object with metadata fields marking it as a weitrix.
mat <- matrix(c(1,2,NA,3,NA,4), ncol=2) weights <- matrix(c(1,0.5,0,2,0,1), ncol=2) se <- SummarizedExperiment(assays=list(foo=mat, bar=weights)) weitrix <- bless_weitrix(se, "foo", "bar") metadata(weitrix) weitrix_x(weitrix) weitrix_weights(weitrix)