I need help making an histogram from a 3x2 tibble. I averaged the 3 samples in each group (Expt and Ctrl) and now trying to plot their histograms in the same plot. Also, I would like to add a legend that contains the coloring and name of each group.
Getting an error: Error: Aesthetics must be either length 1 or the same as the data (3): y
Tible looks like this. 3x2
control.average exp.average
[-0.01280627, -1.014465]
[99.93987077, 10.009083]
[6.02685326, 3.995733]
library(ggplot2)
# Create Histogram
ggplot(sample.average, aes(x = rownames(sample.average), y = colnames(sample.average))) + geom_histogram()+ stat = "identity"+ position = "dodge"