I am experimenting with some simulated p-value distributions.
When plotting my data with hist()
the result looks as expected. The p-values are uniformly distributed and there is a peak close to zero (the 'signal').
data = read_tsv("./data_vector.tsv")
hist(data$p_values, breaks = seq(0, 1, by=1/30))
However, when doing the same with ggplot/qplot, the peak at the left is missing:
qplot(data$p_values, geom="histogram", bins=30)
What did I get wrong? I would have expected the two commands to be equivalent.
Data & Code: My input data as well as a Rmarkdown-report are available from this gist