tidy_empirical {TidyDensity}R Documentation

Tidy Empirical

Description

This function takes in a single argument of .x a vector and will return a tibble of information similar to the tidy_ distribution functions. The y column is set equal to dy from the density function.

Usage

tidy_empirical(.x, .num_sims = 1, .distribution_type = "continuous")

Arguments

.x

A vector of numbers

.num_sims

How many simulations should be run, defaults to 1.

.distribution_type

A string of either "continuous" or "discrete". The function will default to "continuous"

Details

This function takes in a single argument of .x a vector

Value

A tibble

Author(s)

Steven P. Sanderson II, MPH

Examples

x <- mtcars$mpg
tidy_empirical(.x = x, .distribution_type = "continuous")
tidy_empirical(.x = x, .num_sims = 10, .distribution_type = "continuous")


[Package TidyDensity version 1.5.0 Index]