Learn R Programming

TidyDensity (version 1.5.0)

tidy_multi_single_dist: Generate Multiple Tidy Distributions of a single type

Description

Generate multiple distributions of data from the same tidy_ distribution function.

Usage

tidy_multi_single_dist(.tidy_dist = NULL, .param_list = list())

Value

A tibble

Arguments

.tidy_dist

The type of tidy_ distribution that you want to run. You can only choose one.

.param_list

This must be a list() object of the parameters that you want to pass through to the TidyDensity tidy_ distribution function.

Author

Steven P. Sanderson II, MPH

Details

Generate multiple distributions of data from the same tidy_ distribution function. This allows you to simulate multiple distributions of the same family in order to view how shapes change with parameter changes. You can then visualize the differences however you choose.

See Also

Other Multiple Distribution: tidy_combine_distributions()

Examples

Run this code

tidy_multi_single_dist(
  .tidy_dist = "tidy_normal",
  .param_list = list(
    .n = 50,
    .mean = c(-1, 0, 1),
    .sd = 1,
    .num_sims = 3,
    .return_tibble = TRUE
  )
)

tidy_multi_single_dist(
  .tidy_dist = "tidy_normal",
  .param_list = list(
    .n = 50,
    .mean = c(-1, 0, 1),
    .sd = 1,
    .num_sims = 3,
    .return_tibble = FALSE
  )
)

Run the code above in your browser using DataLab