Learn R Programming

bda (version 1.1.1-7)

binhist: Draw histogram based on binned data

Description

Draw histogram based on binned data.

Usage

binhist(x, just="center",scale=1.0)

Arguments

x
a numeric value or a vector.
just
How the data were binned: 'center' (default), 'left' or 'right'.
scale
Data can be rescaled. Default: 1 (no rescaling).

Value

  • If 'scale'=100, the data will be rescaled by dividing all values by 100. For exam the birth weight are usually rounded to 100mg.

Details

Draw histogram using the binned data. The data will not be further binned.

See Also

edf

Examples

Run this code
data(birth)
binhist(birth$Weight,scale=100)
lines(smkde(birth$Weight,scale=100),col=4)
lines(histospline(birth$Weight,scale=100),col=3)
out = binem(birth$Weight,scale=100)
lines(out,col=2)

Run the code above in your browser using DataLab