#' # See a sample data frame
data_3factor
# Before plotting, the result needs to be extracted as below:
res <- qpcrANOVARE(data_3factor, numberOfrefGenes = 1, block = NULL)$Result
res
# Arrange the first three colunms of the result table.
# This determines the columns order and shapes the plot output.
threeFACTORplot(res, arrangement = c(3, 1, 2), errorbar = "se",
xlab = "condition")
threeFACTORplot(res, arrangement = c(1, 2, 3), bar.width = 0.5, fill = "Greys",
xlab = "Genotype", ylab = "Relative Expression", errorbar = "se")
# Reordering factor levels to a desired order.
res$Conc <- factor(res$Conc, levels = c("L","M","H"))
res$Type <- factor(res$Type, levels = c("S","R"))
# Producing the plot
threeFACTORplot(res, arrangement = c(2, 3, 1), bar.width = 0.5,
fill = "Reds", xlab = "Drought", ylab = "Relative Expression",
errorbar = "se", legend.title = "Genotype", legend.position = c(0.2, 0.8))
# When using ci as error, increase the
# y.axis.adjust value to see the plot correctly!
threeFACTORplot(res, arrangement = c(2, 3, 1), bar.width = 0.8, fill = "Greens",
xlab = "Drought", ylab = "Relative Expression", errorbar = "ci",
y.axis.adjust = 1, y.axis.by = 2, letter.position.adjust = 0.6,
legend.title = "Genotype", fontsize = 12, legend.position = c(0.2, 0.8),
show.letters = TRUE)
Run the code above in your browser using DataLab