bless_weitrix: Bless a SummarizedExperiment as a weitrix

Description Usage Arguments Value Examples

View source: R/weitrix.R

Description

Set metadata entries in a SummarizedExperiment object so that it can be used as a weitrix.

Usage

1
bless_weitrix(object, x_name, weights_name)

Arguments

object

A SummarizedExperiment object.

x_name

Name of the assay containing the observations.

weights_name

Name of the assay containing the weights.

Value

A SummarizedExperiment object with metadata fields marking it as a weitrix.

Examples

1
2
3
4
5
6
7
8
9
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)

weitrix documentation built on Nov. 8, 2020, 8:10 p.m.