design,experiment-method {ORFik} | R Documentation |
Get experimental design Find the column/columns that create a separation between samples, by default skips replicate and choose first that is from either: libtype, condition, stage and fraction.
## S4 method for signature 'experiment' design( object, batch.correction.design = FALSE, as.formula = FALSE, multi.factor = TRUE )
object |
an ORFik |
batch.correction.design |
logical, default FALSE. If true, add replicate as a second design factor (only if >= 2 replicates exists). |
as.formula |
logical, default FALSE. If TRUE, return as formula |
multi.factor |
logical, default TRUE If FALSE, return first factor only (+ rep, if batch.correction.design is true). Order of picking is: libtype, if not then: stage, if not then: condition, if not then: fraction. |
a character (name of column) or a formula
df <- ORFik.template.experiment() design(df) # The 2 columns that decides the design here # If we subset it changes design(df[df$libtype == "RFP",]) # Only single factor design, it picks first design(df, multi.factor = FALSE)