R functions to analyse distributions of p values