bless_weitrix.Rd
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 #> $weitrix$x_name #> [1] "foo" #> #> $weitrix$weights_name #> [1] "bar" #> #>#> [,1] [,2] #> [1,] 1 3 #> [2,] 2 NA #> [3,] NA 4#> [,1] [,2] #> [1,] 1.0 2 #> [2,] 0.5 0 #> [3,] 0.0 1