R/nineplot.R

Defines functions nineplot

Documented in nineplot

nineplot <- function(x) {
    x <- x[!is.na(x)]
    n <- length(x)
    mn <- mean(x)
    s <- sd(x)
    opar <- par(mfrow = c(3, 3))
    for (i in 1:4) {
        y <- rnorm(n, mn, s)
        qqnorm(y, xlab = "", ylab = "", main = "repl.")
        qqline(y)
    }
    qqnorm(x, col = "red", main = "real")
    qqline(x, col = "red")
    for (i in 6:9) {
        y <- rnorm(n, mn, s)
        qqnorm(y, xlab = "", ylab = "", main = "repl.")
        qqline(y)
    }
    par(opar)
}

Try the evidence package in your browser

Any scripts or data that you put into this service are public.

evidence documentation built on May 2, 2019, 2:14 p.m.