I have this formula for Rpackage DESEeq
which takes ~Strain
as formula.
I have type.formula <- "Strain"
and want to replace the Strain
in formula with type.formula
and be able to run the code below. How can I do this?
So instead of this code below:
dds <- DESeqDataSetFromMatrix(countData = count.mat , colData = cond, design = ~Strain)
I want to run it like this:
dds <- DESeqDataSetFromMatrix(countData = count.mat , colData = cond, design = ~eval(type.formula))