Closed DrHeisenberg89 closed 7 years ago
Hi @DrHeisenberg89, this is not an issue, so it's better asked at the google group, though googling "reorder factors in r" would help with this question (one of the top hits was this post).
But to answer your question directly, you would make sure that your conditions column is a factor and then use relevel
, like this:
mydf <- data.frame(sample = c(1,2,3,4,5,6), condition = c(rep("wild type", 3), rep("ko", 3)))
mydf$condition <- as.factor(mydf$condition)
mydf$condition <- relevel(mydf$condition, "wild type")
I'm closing this. Please use the Github issues only if there is a bug (actual or probable) in the software or if you have a feature request. Please use the google group for all other use-related questions. And remember that Google searching and StackOverflow are your friends!
Hi there, I calculated the log fold change but it seems I mismatched the two different conditions (wild type and ko conditions); so the fold changes are basically inverted (e.g. rather than having an estimate of 10.08, I have an estimate of -10.08). How am I supposed to fix that problem? Can't find in the manual how can I reorder the factors.