whist: Weighted Histograms Plots or computes the histogram with...

View source: R/utils.R

whistR Documentation

Weighted Histograms Plots or computes the histogram with observations with multiplicities/weights. Just like hist, whist can either plot the histogram or compute the values that define the histogram, by setting plot to TRUE or FALSE. The histogram can either be the one for frequencies or density, by setting freq to TRUE or FALSE.

Description

Weighted Histograms

Plots or computes the histogram with observations with multiplicities/weights.

Just like hist, whist can either plot the histogram or compute the values that define the histogram, by setting plot to TRUE or FALSE.

The histogram can either be the one for frequencies or density, by setting freq to TRUE or FALSE.

Usage

whist(
  x,
  w = 1,
  breaks = "Sturges",
  plot = TRUE,
  freq = NULL,
  xlim = NULL,
  ylim = NULL,
  xlab = "Data",
  ylab = NULL,
  main = NULL,
  add = FALSE,
  col = "lightgray",
  border = NULL,
  lwd = 1,
  ...
)

Arguments

x

a vector of values for which the histogram is desired.

w

a vector of multiplicities/weights for the values in x.

breaks, plot, freq, xlim, ylim, xlab, ylab, main, add, col, border, lwd

These arguments have similar functionalities to their namesakes in function hist.

...

arguments passed on to function plot.

Value

breaks

the break points.

counts

weighted counts over the intervals determined by breaks

density

density values over the intervals determined by breaks

mids

midpoints of the intervals determined by breaks

Author(s)

Yong Wang <yongwang@auckland.ac.nz>

See Also

hist.


nspmix documentation built on June 8, 2025, 12:29 p.m.

Related to whist in nspmix...