histogram: histogram

Description Usage Arguments Value Author(s) References See Also

View source: R/plots.R

Description

histogram Display an histogram of frequency distribution. #'

Usage

1
2
3
4
5
6
7
8
9
histogram(
  xvar,
  title,
  ylab = "count",
  xlab,
  by = "days",
  width = 1,
  color = "#000099"
)

Arguments

xvar

As numbers, factors or text.

title

As character : main title

ylab

Y axis label

xlab

X axis label

by

For date values by parameters allows to plot histogram "by" days,months or years

width

numeric, define width of each bar using the unit of the variable width = 5 to have histogram of age by 5 years

color

Colors can be specified as color eg "red" "blue" or as a hexadecimal RGB triplet, such as "#0066CC". The first two digits are the level of red, the next two green, and the last two blue. The value for each ranges from 00 to FF in hexadecimal (base-16) notation, which is equivalent to 0 and 255 in base-10. For example, “#FFFFFF” is white and “#990000” is a deep red.

Value

An array containing resulting graph #' @examples histogram(c(3,1,2,2,5))

Author(s)

Gilles Desve

References

Based on: Epi6 and Stata functionnality, available at https://github.com/.

See Also

bargraph for bar graph


gdesve/epifield documentation built on Jan. 23, 2022, 10:03 a.m.