Description Usage Arguments Value See Also Examples
View source: R/relativeHistogram.R
relativeHistogram()
produces a relative histogram based on
the contents of the input data frame, which must be a mt_univariateSummary
object.
1 | relativeHistogram(data, xLabel, barColor = "#BDDFF7")
|
data |
|
xLabel |
character string; |
barColor |
character string; fill color for bars (valid color) |
A plot_ly
visualization of a
mt_univariateSummary
object, showing the distribution of a
binned variable x
.
1 2 3 4 5 6 7 8 9 10 11 12 | # numeric x with missings
x <- c(rnorm(5000, 100, 10), rep(as.numeric(NA), 500))
z <- univariateSummary(x, numBins = 20)
relativeHistogram(z, "Random Normal")
# logical x
x <- round(runif(20))
z <- univariateSummary(x)
relativeHistogram(z, "Random Binary", "orange")
# character x
relativeHistogram(univariateSummary(iris$Species), "Species", "#77BF30")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.