Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

adeg.panel.hist

Panel function for adding histograms.


Description

Panel function for displaying histograms into a trellis graphic (lattice package) and level lines.

Usage

adeg.panel.hist(histValues, horizontal = TRUE, densi, drawLines, params = list(), 
  identifier = "histogramADEg")

Arguments

histValues

an object of class histogram. See hist.

horizontal

a logical indicating if the plot is horizontal

densi

a list returns by the bkde containing the coordinates of the binned kernel density estimate of the probability density of the data

drawLines

a vector containing the level values

params

graphical parameters : plot.polygon, add.line and plot.line (lattice)

identifier

A character string that is prepended to the name of the grob that is created.

Value

Displays the histogram and level lines.

Note

For more information about the use of panel functions, please see the lattice package developed by Deepayan Sarkar.

Author(s)

Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray

See Also

bkde and hist

Examples

if(require(KernSmooth, quietly = TRUE) & require(lattice, quietly = TRUE)) {

  z <- round(rnorm(100, 30, 5))
  h <- hist(z, plot = FALSE)
  d <- bkde(z, kernel = "normal", gridsize = 60)
  l <- c(10, 20, 30, 40)
  xyplot(1:50 ~ 1:50, histValues = h, densi = d, drawLines = l, 
    panel = function(drawLines, histValues, densi){
      adeg.panel.hist(histValues = histValues, drawLines = drawLines, densi = densi)})
}

adegraphics

An S4 Lattice-Based Package for the Representation of Multivariate Data

v1.0-15
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr> and Aurélie Siberchicot <aurelie.siberchicot@univ-lyon1.fr>, with contributions from Jean Thioulouse. Based on earlier work by Alice Julien-Laferrière.
Initial release
2018-12-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.