Learn R Programming

healthyR.ai (version 0.1.0)

hai_get_density_data_tbl: Get Density Data Helper

Description

This function will return a tibble that can either be nested/unnested, and grouped or un-grouped. The .data argument must be the output of the hai_distribution_comparison_tbl() function.

Usage

hai_get_density_data_tbl(.data, .unnest = TRUE, .group_data = TRUE)

Value

A tibble.

Arguments

.data

The data from the hai_distribution_comparison_tbl() function as this function looks for an attribute of hai_dist_compare_tbl

.unnest

Should the resulting tibble be un-nested, a Boolean value TRUE/FALSE. The default is TRUE

.group_data

Should the resulting tibble be grouped, a Boolean value TRUE/FALSE. The default is FALSE

Author

Steven P. Sanderson II, MPH

Details

This function expects to take the output of the hai_distribution_comparison_tbl() function. It returns a tibble of the tidy density data.

See Also

Other Distribution Functions: hai_distribution_comparison_tbl(), hai_get_dist_data_tbl()

Examples

Run this code
library(dplyr)

df <- hai_scale_zero_one_vec(.x = mtcars$mpg) %>%
  hai_distribution_comparison_tbl()
hai_get_density_data_tbl(df)

Run the code above in your browser using DataLab