Skip to content

Commit

Permalink
Merge pull request #319 from spsanderson/development
Browse files Browse the repository at this point in the history
Fixes #311
  • Loading branch information
spsanderson authored Oct 11, 2022
2 parents 9996206 + 000eed6 commit d48451d
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 57 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ passed arguments and fix `data.table` to directly pass ... arguments.
5. Fix #309 - Add function for internal use to drop dependency of stringr. Function
is `dist_type_extractor()` which is used for several functions in the library.
6. Fix #310 - Update combine-multi-dist to use `dist_type_extractor()`
7. Fix #311 - Update all `util_dist_stats_tbl()` functions to use `dist_type_extractor()`

# TidyDensity 1.2.3

Expand Down
4 changes: 1 addition & 3 deletions R/stats-bernoulli-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ util_bernoulli_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-beta-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ util_beta_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-binomial-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ util_binomial_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-cauchy-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ util_cauchy_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-chisquare-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ util_chisquare_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-exponential-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ util_exponential_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-f-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ util_f_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-gamma-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ util_gamma_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-geometric-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ util_geometric_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-hypergeometric-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ util_hypergeometric_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-logistic-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ util_logistic_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-lognormal-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ util_lognormal_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-negative-binomial-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ util_negative_binomial_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-normal-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ util_normal_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-pareto-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ util_pareto_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-poisson-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ util_poisson_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-t-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ util_t_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-uniform-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ util_uniform_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down
4 changes: 1 addition & 3 deletions R/stats-weibull-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ util_weibull_stats_tbl <- function(.data) {
ret <- dplyr::tibble(
tidy_function = atb$tibble_type,
function_call = atb$dist_with_params,
distribution = atb$tibble_type %>%
stringr::str_remove("tidy_") %>%
stringr::str_to_title(),
distribution = dist_type_extractor(atb$tibble_type),
distribution_type = atb$distribution_family_type,
points = atb$.n,
simulations = atb$.num_sims,
Expand Down

0 comments on commit d48451d

Please sign in to comment.