R/panel_hist.R

Defines functions panel.hist

Documented in panel.hist

#' Pairs plots for correlations
#'
#' panel.hist creates histograms for pairs2
#' @param x dataset containing y covariate
#' @keywords multimodel
#' @export
#' @examples
#' panel.hist


panel.hist <- 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 = "grey", ...)
}
jpwrobinson/funk documentation built on Nov. 21, 2021, 11:23 p.m.