hist_to_binned_data: Convert Histogram to Binned Format

Description Usage Arguments Value Examples

View source: R/utils.R

Description

This is a convenience function to convert a histogram object from hist into the binned value format expected by 'data-ui' dui_barseries and dui_densityseries argument binnedData.

Usage

1

Arguments

h

histogram object or list from hist

density

logical to indicate the use of density or count

Value

list

Examples

1
2
3
4
5
6
7
8
library(dataui)

h <- graphics::hist(stats::rnorm(100), plot = FALSE)
dui_histogram(
  components = list(
    dui_barseries(binnedData = hist_to_binned_data(h))
  )
)

timelyportfolio/dataui documentation built on July 15, 2020, 12:03 p.m.