I have a dataframe that contains information on gene expression level.
Column names are gene names and row names are patient IDs.
How can I make bar plot where X axis is Gene names and Y axis is expression level?
I cannot find a way to label Gene A and Gene B in ggplot2
without merging them into the same column and type Gene A and B in a separate column.
There has to be a simple way to do this without changing the structure of data, but I cannot find it.
#Example Data
df <- data.frame(1:5,3:7)
colnames(df) <- c("Gene_A","Gene_B")
row.names(df) <- c("Pat_A","Pat_B","Pat_C","Pat_D","Pat_E")
I have tried to use one discrete, one continuous method as ggplot2 cheat sheet suggested.
f <- ggplot(mpg, aes(class, hwy)) + geom_...()
In the above code class is gene names, but I cannot determine what I should use for hwy.