I am looking for the reason why I am getting the "could not find function "geom_text"" error. Enter the following commands to generate a PCA graph with captions on the graph of each "dot":
counts <- read.delim('case_vs_control.txt', sep="\t", header=T, row.names=1)
counts <- as.matrix(counts)
design <- data.frame( condition=factor( c("case", "case", "case", "case", "case", "case", "control", "control", "control", "control", "control", "control") ) )
rownames(design) <- colnames(counts)
dataset <- DESeqDataSetFromMatrix(countData = counts, colData = design, design = ~condition)
dds <- DESeq(dataset)
rld <- rlog(dds, blind=FALSE)
names <- c("0099-M9-PGA-rep1", "0099-M9-PGA-rep2", "0099-M9-PGA-rep3", "0223-M9-PGA-rep1", "0223-M9-PGA-rep2", "0223-M9-PGA-rep3", "0099-M9-rep1", "0099-M9-rep2", "0099-M9-rep3", "0223-M9-rep1", "0223-M9-rep2", "0223-M9-rep3")
pdf("PCAall.pdf")
plotPCA(rld, intgroup=c("condition")) + geom_text(aes(label=names),vjust=2, size = 2)
dev.off()
Unfortunately, I am only able to generate a chart without sample captions on the chart (assignment of a specific dot to a specific sample).
I will be grateful for help :)