Skip to content

Instantly share code, notes, and snippets.

@jaehyeon-kim
Created June 4, 2012 04:16
Show Gist options
  • Save jaehyeon-kim/2866302 to your computer and use it in GitHub Desktop.
Save jaehyeon-kim/2866302 to your computer and use it in GitHub Desktop.
Trial
# Define the function
ggd.qqplot = function(pvector, main=NULL, ...) {
o = -log10(sort(pvector,decreasing=F))
e = -log10( 1:length(o)/length(o) )
plot(e,o,pch=19,cex=1, main=main, ...,
xlab=expression(Expected~~-log[10](italic(p))),
ylab=expression(Observed~~-log[10](italic(p))),
xlim=c(0,max(e)), ylim=c(0,max(e)))
lines(e,e,col="red")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment