Hi all. I'm new to this kind of analysis so maybe will be silly.
I'm trying to group the columns of my Pheatmap. My dataframe contains expression level of genes in different condition: timepoint (24h,48h,72h) and treatment (untreated and treated). My Pheatmap has 6 columns in this way: treated.24h, treated.48h, treated.72h, untreated24h, untreated48h, untreated 72h. Instead, I only want two columns: treated and untreated (grouping all timepoints).
For example, I can do this very easily with boxplot:
boxplot(unlist(mydataframewithgenes["GENE",] ~ treatment))
is there a similar way to obtain this with pheatmap? Something like
pheatmap(mydataframewithgenes ~ treatment)
Which sadly doesn't work.
Thanks in advance!
Hi,
You mean to take the average expression of each group per gene and plot only 2 columns with averages?