create_design | R Documentation |
Create design matrix for statistical analysis
create_design(object, ...)
## S3 method for class 'SummarizedExperiment'
create_design(
object,
formula = default_formula(object),
drop = varlevels_dont_clash(object, all.vars(formula)),
codingfun = contr.treatment.explicit,
verbose = TRUE,
...
)
## S3 method for class 'data.table'
create_design(
object,
formula = default_formula(object),
drop = varlevels_dont_clash(object, all.vars(formula)),
codingfun = contr.treatment.explicit,
verbose = TRUE,
...
)
object |
SummarizedExperiment or data.frame |
... |
required to s3ify |
formula |
formula with svars |
drop |
whether to drop predictor names |
codingfun |
factor coding function
|
verbose |
whether to message |
design matrix
file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
unique(create_design(object))
unique(create_design(object, ~ Time))
unique(create_design(object, ~ Time, codingfun = contr.treatment.explicit))
unique(create_design(object, ~ Time, codingfun = contr.diff))
unique(create_design(object, ~ Time + Diabetes))
unique(create_design(object, ~ Time / Diabetes))
unique(create_design(object, ~ Time * Diabetes))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.