HistogramTools (version 0.3.2)

ScaleHistogram: Scale Histogram Counts

Description

Scales the counts of the provided histograms by the provided factor and returns a new histogram.

Usage

ScaleHistogram(x, factor)

Arguments

x
A "histogram" object (created by hist) representing a dataset summarized by binning.
factor
A number value to scale the bucket counts by. Defaults to 1/Count(x) to normalize the sum of counts of the histogram to 1.

See Also

histogramtools-package, hist.

Examples

Run this code
x <- runif(100)
h <- hist(x, plot=FALSE)
plot(ScaleHistogram(h, 10))

Run the code above in your browser using DataLab