R/panelhist.R

panelhist <-
function(x, ...)
{
    usr <- par("usr"); on.exit(par(usr))
    par(usr = c(usr[1:2], 0, 1.5) )
    h <- hist(x, plot = FALSE)
    breaks <- h$breaks; nB <- length(breaks)
    y <- h$counts; y <- y/max(y)
    rect(breaks[-nB], 0, breaks[-1], y, col="blue", border="blue", ...)
}

Try the siar package in your browser

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

siar documentation built on May 2, 2019, 11:02 a.m.