Last active
October 13, 2016 07:08
-
-
Save shanmdphd/765ec9dbed88f1a8a9401b0427855d2f to your computer and use it in GitHub Desktop.
NONMEM accessaries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###### Scatter plot matrices (pairs plots) ###### | |
pairs(d.demog) | |
#add a loess smoother, type: | |
pairs(d.demog, panel = panel.smooth) | |
panel.cor <- function(x, y, digits=2, prefix="", cex.cor) | |
{ | |
usr <- par("usr"); on.exit(par(usr)) | |
par(usr = c(0, 1, 0, 1)) | |
r = (cor(x, y)) | |
txt <- format(c(r, 0.123456789), digits=digits)[1] | |
txt <- paste(prefix, txt, sep="") | |
if(missing(cex.cor)) cex <- 1.5 | |
text(0.5, 0.5, txt, cex = 1.5) | |
} | |
pairs(d.demog, lower.panel=panel.smooth, upper.panel=panel.cor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment