I know it should be simple but I am really struggling. I want to change zeros to 1s. Here is what I tried so far:
> dds[ counts(dds)[counts(dds) == "0"] <- 1] Error in validObject(object) : invalid class "DESeqDataSet" object: the count data is not in integer mode > > dds[ revalue(as.factor(counts(dds))), c("0"="1") ] Error: cannot subset by character when rownames are NULL
The count data is in fact integer, so I don't know why the first option fails. For the second, the syntax doesn't seem correct, but it is somehow beyond me to get it right...