create_design {autonomics}R Documentation

Create design

Description

Create design matrix for statistical analysis

Usage

create_design(
  object,
  subgroupvar = if ("subgroup" %in% svars(object)) "subgroup" else NULL,
  formula = default_formula(object, subgroupvar, fit = "limma"),
  verbose = TRUE
)

Arguments

object

SummarizedExperiment

subgroupvar

subgroup svar

formula

formula with svars

verbose

whether to message

Value

design matrix

Examples

file <- download_data('billing19.rnacounts.txt')
object <- read_rnaseq_counts(file, plot=FALSE)
unique(create_design(object))

object$subgroup <- 'billing19'
unique(create_design(object))

file <- download_data('atkin18.somascan.adat')
object <- read_somascan(file, plot=FALSE)
unique(create_design(object))
create_design(object, formula= ~ 0 + SampleGroup + Sex + T2D + age + bmi)
object$subgroup <- 'atkin18'
unique(create_design(object))

[Package autonomics version 1.1.7 Index]