is_valid_formula | R Documentation |
Is valid formula
is_valid_formula(
x,
y,
.xname = get_name_in_parent(x),
.yname = get_name_in_parent(y)
)
assert_valid_formula(
x,
y,
.xname = get_name_in_parent(x),
.yname = get_name_in_parent(y)
)
x |
formula |
y |
SummarizedExperiment |
.xname |
string |
.yname |
string |
TRUE or false
object <- matrix(1:9, nrow = 3)
rownames(object) <- sprintf('f%d', 1:3)
colnames(object) <- sprintf('s%d', 1:3)
object <- list(exprs = object)
object %<>% SummarizedExperiment::SummarizedExperiment()
object$group <- 'group0'
object$subgroup <- c('A', 'B', 'C')
svars(object)
is_valid_formula( 'condition', object) # not formula
is_valid_formula( ~condition, object) # not svar
is_valid_formula( ~group, object) # not multilevel
is_valid_formula( ~subgroup, object) # TRUE
is_valid_formula( ~0+subgroup, object) # TRUE
is_valid_formula( ~1, object) # TRUE
assert_valid_formula( ~subgroup, object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.