diff --git a/DESCRIPTION b/DESCRIPTION index d79f7589..7ef4046f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,6 +18,8 @@ Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 URL: https://github.com/spsanderson/TidyDensity BugReports: https://github.com/spsanderson/TidyDensity/issues +Depends: + R (>= 4.1.0) Imports: magrittr, rlang (>= 0.4.11), diff --git a/R/augment-bootstrap-density.R b/R/augment-bootstrap-density.R index 824972e4..52856fca 100644 --- a/R/augment-bootstrap-density.R +++ b/R/augment-bootstrap-density.R @@ -22,11 +22,11 @@ #' @examples #' x <- mtcars$mpg #' -#' tidy_bootstrap(x) %>% +#' tidy_bootstrap(x) |> #' bootstrap_density_augment() #' -#' tidy_bootstrap(x) %>% -#' bootstrap_unnest_tbl() %>% +#' tidy_bootstrap(x) |> +#' bootstrap_unnest_tbl() |> #' bootstrap_density_augment() #' #' @return @@ -56,7 +56,7 @@ bootstrap_density_augment <- function(.data) { # Add density data if (atb$tibble_type == "tidy_bootstrap_nested") { - df_tbl <- dplyr::as_tibble(.data) %>% + df_tbl <- dplyr::as_tibble(.data) |> TidyDensity::bootstrap_unnest_tbl() } @@ -64,18 +64,18 @@ bootstrap_density_augment <- function(.data) { df_tbl <- dplyr::as_tibble(.data) } - df_tbl <- df_tbl %>% - dplyr::nest_by(sim_number) %>% + df_tbl <- df_tbl |> + dplyr::nest_by(sim_number) |> dplyr::mutate(dens_tbl = list( stats::density(unlist(data), n = nrow(data) - )[c("x", "y")] %>% - purrr::set_names("dx", "dy") %>% + )[c("x", "y")] |> + purrr::set_names("dx", "dy") |> dplyr::as_tibble() - )) %>% - tidyr::unnest(cols = c(data, dens_tbl)) %>% - dplyr::mutate(x = dplyr::row_number()) %>% - dplyr::ungroup() %>% + )) |> + tidyr::unnest(cols = c(data, dens_tbl)) |> + dplyr::mutate(x = dplyr::row_number()) |> + dplyr::ungroup() |> dplyr::select(sim_number, x, y, dx, dy, dplyr::everything()) # Return diff --git a/R/augment-bootstrap-p.R b/R/augment-bootstrap-p.R index f6ad8845..aa778a1f 100644 --- a/R/augment-bootstrap-p.R +++ b/R/augment-bootstrap-p.R @@ -20,8 +20,8 @@ #' #' @examples #' x <- mtcars$mpg -#' tidy_bootstrap(x) %>% -#' bootstrap_unnest_tbl() %>% +#' tidy_bootstrap(x) |> +#' bootstrap_unnest_tbl() |> #' bootstrap_p_augment(y) #' #' @return diff --git a/R/augment-bootstrap-q.R b/R/augment-bootstrap-q.R index d82139be..e03a05bb 100644 --- a/R/augment-bootstrap-q.R +++ b/R/augment-bootstrap-q.R @@ -21,8 +21,8 @@ #' @examples #' x <- mtcars$mpg #' -#' tidy_bootstrap(x) %>% -#' bootstrap_unnest_tbl() %>% +#' tidy_bootstrap(x) |> +#' bootstrap_unnest_tbl() |> #' bootstrap_q_augment(y) #' #' @return diff --git a/R/autoplot-combined-dist.R b/R/autoplot-combined-dist.R index ebf5fc0a..4bfe254b 100644 --- a/R/autoplot-combined-dist.R +++ b/R/autoplot-combined-dist.R @@ -47,10 +47,10 @@ #' #' combined_tbl #' -#' combined_tbl %>% +#' combined_tbl |> #' tidy_combined_autoplot() #' -#' combined_tbl %>% +#' combined_tbl |> #' tidy_combined_autoplot(.plot_type = "qq") #' #' @return @@ -126,7 +126,7 @@ tidy_combined_autoplot <- function(.data, .plot_type = "density", .line_size = . } if (plot_type == "density") { - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes( x = dx, y = dy, @@ -144,16 +144,16 @@ tidy_combined_autoplot <- function(.data, .plot_type = "density", .line_size = . ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "quantile") { ## EDIT - data_tbl <- data_tbl %>% - dplyr::select(sim_number, dist_type, q) %>% - dplyr::group_by(sim_number, dist_type) %>% - dplyr::arrange(q) %>% - dplyr::mutate(x = 1:dplyr::n() %>% - tidy_scale_zero_one_vec()) %>% + data_tbl <- data_tbl |> + dplyr::select(sim_number, dist_type, q) |> + dplyr::group_by(sim_number, dist_type) |> + dplyr::arrange(q) |> + dplyr::mutate(x = 1:dplyr::n() |> + tidy_scale_zero_one_vec()) |> dplyr::ungroup() ## End EDIT - plt <- data_tbl %>% - dplyr::filter(q > -Inf, q < Inf) %>% + plt <- data_tbl |> + dplyr::filter(q > -Inf, q < Inf) |> ggplot2::ggplot( ggplot2::aes( # x = tidy_scale_zero_one_vec(dx), @@ -174,7 +174,7 @@ tidy_combined_autoplot <- function(.data, .plot_type = "density", .line_size = . ) + ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "probability") { - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes( x = y, @@ -192,7 +192,7 @@ tidy_combined_autoplot <- function(.data, .plot_type = "density", .line_size = . ) + ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "qq") { - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes( sample = y, @@ -210,10 +210,10 @@ tidy_combined_autoplot <- function(.data, .plot_type = "density", .line_size = . ) + ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "mcmc") { - plt <- data_tbl %>% - dplyr::group_by(sim_number, dist_type) %>% - dplyr::mutate(cmy = dplyr::cummean(y)) %>% - dplyr::ungroup() %>% + plt <- data_tbl |> + dplyr::group_by(sim_number, dist_type) |> + dplyr::mutate(cmy = dplyr::cummean(y)) |> + dplyr::ungroup() |> ggplot2::ggplot(ggplot2::aes( x = x, y = cmy, group = interaction(dist_type, sim_number), color = sim_number )) + diff --git a/R/autoplot-four-graphs.R b/R/autoplot-four-graphs.R index 37b64471..16074955 100644 --- a/R/autoplot-four-graphs.R +++ b/R/autoplot-four-graphs.R @@ -39,7 +39,7 @@ #' will return an interactive `plotly` plot. #' #' @examples -#' tidy_normal(.num_sims = 5) %>% +#' tidy_normal(.num_sims = 5) |> #' tidy_four_autoplot() #' #' @return diff --git a/R/autoplot-multi-dist.R b/R/autoplot-multi-dist.R index 909e9002..8d9e9a56 100644 --- a/R/autoplot-multi-dist.R +++ b/R/autoplot-multi-dist.R @@ -50,10 +50,10 @@ #' ) #' ) #' -#' tn %>% +#' tn |> #' tidy_multi_dist_autoplot() #' -#' tn %>% +#' tn |> #' tidy_multi_dist_autoplot(.plot_type = "qq") #' #' @return @@ -223,7 +223,7 @@ tidy_multi_dist_autoplot <- function(.data, .plot_type = "density", .line_size = } if (plot_type == "density" & atb$all$distribution_family_type == "continuous") { - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes(x = dx, y = dy, group = interaction(dist_name, sim_number), color = dist_name) ) + @@ -236,7 +236,7 @@ tidy_multi_dist_autoplot <- function(.data, .plot_type = "density", .line_size = ) + ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "density" & atb$all$distribution_family_type == "discrete") { - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes(x = y, group = interaction(dist_name, sim_number), fill = dist_name) ) + @@ -253,14 +253,14 @@ tidy_multi_dist_autoplot <- function(.data, .plot_type = "density", .line_size = ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "quantile") { ## EDIT - data_tbl <- data_tbl %>% - dplyr::select(sim_number, dist_name, q) %>% - dplyr::group_by(sim_number, dist_name) %>% - dplyr::arrange(q) %>% - dplyr::mutate(x = 1:dplyr::n()) %>% + data_tbl <- data_tbl |> + dplyr::select(sim_number, dist_name, q) |> + dplyr::group_by(sim_number, dist_name) |> + dplyr::arrange(q) |> + dplyr::mutate(x = 1:dplyr::n()) |> dplyr::ungroup() ## End EDIT - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes( x = x, y = q, group = interaction(dist_name, sim_number), color = dist_name @@ -275,7 +275,7 @@ tidy_multi_dist_autoplot <- function(.data, .plot_type = "density", .line_size = ) + ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "probability") { - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes( x = y, group = interaction(dist_name, sim_number), color = dist_name @@ -290,7 +290,7 @@ tidy_multi_dist_autoplot <- function(.data, .plot_type = "density", .line_size = ) + ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "qq") { - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot( ggplot2::aes( sample = y, group = interaction(dist_name, sim_number), color = dist_name @@ -306,10 +306,10 @@ tidy_multi_dist_autoplot <- function(.data, .plot_type = "density", .line_size = ) + ggplot2::theme(legend.position = leg_pos) } else if (plot_type == "mcmc") { - plt <- data_tbl %>% - dplyr::group_by(sim_number, dist_name) %>% - dplyr::mutate(cmy = dplyr::cummean(y)) %>% - dplyr::ungroup() %>% + plt <- data_tbl |> + dplyr::group_by(sim_number, dist_name) |> + dplyr::mutate(cmy = dplyr::cummean(y)) |> + dplyr::ungroup() |> ggplot2::ggplot(ggplot2::aes( x = x, y = cmy, group = interaction(dist_name, sim_number), color = sim_number )) + diff --git a/R/autoplot-randomwalk.R b/R/autoplot-randomwalk.R index 3e0834a1..95030194 100644 --- a/R/autoplot-randomwalk.R +++ b/R/autoplot-randomwalk.R @@ -27,12 +27,12 @@ #' will return an interactive `plotly` plot. #' #' @examples -#' tidy_normal(.sd = .1, .num_sims = 5) %>% -#' tidy_random_walk(.value_type = "cum_sum") %>% +#' tidy_normal(.sd = .1, .num_sims = 5) |> +#' tidy_random_walk(.value_type = "cum_sum") |> #' tidy_random_walk_autoplot() #' -#' tidy_normal(.sd = .1, .num_sims = 20) %>% -#' tidy_random_walk(.value_type = "cum_sum", .sample = TRUE, .replace = TRUE) %>% +#' tidy_normal(.sd = .1, .num_sims = 20) |> +#' tidy_random_walk(.value_type = "cum_sum", .sample = TRUE, .replace = TRUE) |> #' tidy_random_walk_autoplot() #' #' @return @@ -51,8 +51,8 @@ tidy_random_walk_autoplot <- function(.data, .line_size = .5, .geom_rug = FALSE, atb <- attributes(.data) n <- atb$all$.n sims <- atb$all$.num_sims - # dist_type <- stringr::str_remove(atb$all$tibble_type, "tidy_") %>% - # stringr::str_replace_all(pattern = "_", " ") %>% + # dist_type <- stringr::str_remove(atb$all$tibble_type, "tidy_") |> + # stringr::str_replace_all(pattern = "_", " ") |> # stringr::str_to_title() dist_type <- dist_type_extractor(atb$all$tibble_type) @@ -160,7 +160,7 @@ tidy_random_walk_autoplot <- function(.data, .line_size = .5, .geom_rug = FALSE, data_tbl <- dplyr::as_tibble(.data) # Plot ---- - plt <- data_tbl %>% + plt <- data_tbl |> ggplot2::ggplot(ggplot2::aes( x = x, y = random_walk_value, group = sim_number, color = sim_number diff --git a/R/bootstrap-unnest-tbl.R b/R/bootstrap-unnest-tbl.R index 7b67e794..be4d6458 100644 --- a/R/bootstrap-unnest-tbl.R +++ b/R/bootstrap-unnest-tbl.R @@ -18,7 +18,7 @@ #' tb <- tidy_bootstrap(.x = mtcars$mpg) #' bootstrap_unnest_tbl(tb) #' -#' bootstrap_unnest_tbl(tb) %>% +#' bootstrap_unnest_tbl(tb) |> #' tidy_distribution_summary_tbl(sim_number) #' #' @return @@ -41,7 +41,7 @@ bootstrap_unnest_tbl <- function(.data) { } # Data ---- - df <- tidyr::unnest(.data, bootstrap_samples) %>% + df <- tidyr::unnest(.data, bootstrap_samples) |> purrr::set_names("sim_number", "y") # Return ---- diff --git a/R/combine-multi-single-dist-tbl.R b/R/combine-multi-single-dist-tbl.R index fa7947e0..76e76795 100644 --- a/R/combine-multi-single-dist-tbl.R +++ b/R/combine-multi-single-dist-tbl.R @@ -68,22 +68,22 @@ tidy_multi_single_dist <- function(.tidy_dist = NULL, names(param_grid) <- methods::formalArgs(td) # Run call on the grouped df ---- - dff <- param_grid %>% + dff <- param_grid |> dplyr::mutate(results = purrr::pmap(dplyr::pick(dplyr::everything()), match.fun(td))) #dplyr::mutate(results = purrr::pmap(dplyr::cur_data(), match.fun(td))) # Get the attributes to be used later on ---- - atb <- dff$results[[1]] %>% attributes() + atb <- dff$results[[1]] |> attributes() # Make Dist Type for column ---- - # dist_type <- stringr::str_remove(atb$tibble_type, "tidy_") %>% - # stringr::str_replace_all(pattern = "_", " ") %>% + # dist_type <- stringr::str_remove(atb$tibble_type, "tidy_") |> + # stringr::str_replace_all(pattern = "_", " ") |> # stringr::str_to_title() dist_type <- dist_type_extractor(atb$tibble_type) # Get column names from the param_grid in order to make teh dist_type column ---- - cols <- names(param_grid %>% dplyr::select(-c(.n, .num_sims))) + cols <- names(param_grid |> dplyr::select(-c(.n, .num_sims))) if (length(cols) == 1) { dff$dist_name <- paste0(dist_type, " c(", dff[, cols], ")") @@ -101,11 +101,11 @@ tidy_multi_single_dist <- function(.tidy_dist = NULL, # ")" # ) - df_unnested_tbl <- dff %>% - tidyr::unnest(results) %>% - dplyr::ungroup() %>% - dplyr::select(sim_number, dist_name, x:q) %>% - dplyr::mutate(dist_name = as.factor(dist_name)) %>% + df_unnested_tbl <- dff |> + tidyr::unnest(results) |> + dplyr::ungroup() |> + dplyr::select(sim_number, dist_name, x:q) |> + dplyr::mutate(dist_name = as.factor(dist_name)) |> dplyr::arrange(sim_number, dist_name) # Attach attributes ---- diff --git a/R/combine-tidy-distributions-tbl.R b/R/combine-tidy-distributions-tbl.R index 67cdb17c..49a365aa 100644 --- a/R/combine-tidy-distributions-tbl.R +++ b/R/combine-tidy-distributions-tbl.R @@ -57,10 +57,10 @@ tidy_combine_distributions <- function(...) { # Get the distribution type dist_final_tbl <- purrr::map( .x = dist_list, - .f = ~ .x %>% - dplyr::mutate(dist_type = attributes(.x)[["dist_with_params"]]) %>% + .f = ~ .x |> + dplyr::mutate(dist_type = attributes(.x)[["dist_with_params"]]) |> dplyr::mutate(dist_type = as.factor(dist_type)) - ) %>% + ) |> purrr::map_dfr(dplyr::as_tibble) attr(dist_final_tbl, "tibble_type") <- "tidy_multi_dist_combine" diff --git a/R/empirical-tidy-bootstrap.R b/R/empirical-tidy-bootstrap.R index 1403bc1e..5e09f594 100644 --- a/R/empirical-tidy-bootstrap.R +++ b/R/empirical-tidy-bootstrap.R @@ -74,11 +74,11 @@ tidy_bootstrap <- function(.x, .num_sims = 2000, .proportion = 0.8, } # Data ---- - df <- dplyr::tibble(sim_number = as.factor(1:num_sims)) %>% - dplyr::group_by(sim_number) %>% + df <- dplyr::tibble(sim_number = as.factor(1:num_sims)) |> + dplyr::group_by(sim_number) |> dplyr::mutate(bootstrap_samples = list( sample(x = x_term, size = floor(prop * n), replace = TRUE) - )) %>% + )) |> dplyr::ungroup() # Attach descriptive attributes to tibble diff --git a/R/empirical-tidy.R b/R/empirical-tidy.R index ee307ea7..0be05104 100644 --- a/R/empirical-tidy.R +++ b/R/empirical-tidy.R @@ -41,35 +41,35 @@ tidy_empirical <- function(.x, .num_sims = 1, .distribution_type = "continuous") ## New P e <- stats::ecdf(x_term) - df <- dplyr::tibble(sim_number = as.factor(1:num_sims)) %>% - dplyr::group_by(sim_number) %>% - dplyr::mutate(x = list(1:n)) %>% + df <- dplyr::tibble(sim_number = as.factor(1:num_sims)) |> + dplyr::group_by(sim_number) |> + dplyr::mutate(x = list(1:n)) |> dplyr::mutate(y = ifelse( num_sims == 1, list(x_term), list(sample(x_term, replace = TRUE)) - )) %>% - dplyr::mutate(d = list(density(unlist(y), n = n)[c("x", "y")] %>% - purrr::set_names("dx", "dy") %>% - dplyr::as_tibble())) %>% - dplyr::mutate(p = list(e(unlist(y)))) %>% - dplyr::mutate(q = NA) %>% - tidyr::unnest(cols = c(x, y, d, p, q)) %>% + )) |> + dplyr::mutate(d = list(density(unlist(y), n = n)[c("x", "y")] |> + purrr::set_names("dx", "dy") |> + dplyr::as_tibble())) |> + dplyr::mutate(p = list(e(unlist(y)))) |> + dplyr::mutate(q = NA) |> + tidyr::unnest(cols = c(x, y, d, p, q)) |> dplyr::ungroup() - q_vec <- df %>% - dplyr::select(sim_number, y) %>% - dplyr::group_by(sim_number) %>% + q_vec <- df |> + dplyr::select(sim_number, y) |> + dplyr::group_by(sim_number) |> dplyr::mutate( q = rep( stats::quantile(y, probs = seq(0, 1, 1 / (n - 1)), type = 1), 1 ) - ) %>% - dplyr::ungroup() %>% + ) |> + dplyr::ungroup() |> dplyr::select(q) - df <- df %>% + df <- df |> dplyr::mutate(q = q_vec$q) # Attach descriptive attributes to tibble @@ -108,24 +108,24 @@ tidy_empirical <- function(.x, .num_sims = 1, .distribution_type = "continuous") # # p_vec <- dft$y # -# df <- dplyr::tibble(sim_number = as.factor(1)) %>% -# dplyr::group_by(sim_number) %>% -# dplyr::mutate(x = list(1:n)) %>% -# dplyr::mutate(y = NA) %>% -# dplyr::mutate(d = list(density(unlist(x), n = n)[c("x", "y")] %>% -# purrr::set_names("dx", "dy") %>% -# dplyr::as_tibble())) %>% -# dplyr::mutate(p = list(p_vec)) %>% -# dplyr::mutate(q = NA) %>% -# dplyr::mutate(y = list(d[[1]][["dy"]])) %>% -# tidyr::unnest(cols = c(x, y, d, p, q)) %>% +# df <- dplyr::tibble(sim_number = as.factor(1)) |> +# dplyr::group_by(sim_number) |> +# dplyr::mutate(x = list(1:n)) |> +# dplyr::mutate(y = NA) |> +# dplyr::mutate(d = list(density(unlist(x), n = n)[c("x", "y")] |> +# purrr::set_names("dx", "dy") |> +# dplyr::as_tibble())) |> +# dplyr::mutate(p = list(p_vec)) |> +# dplyr::mutate(q = NA) |> +# dplyr::mutate(y = list(d[[1]][["dy"]])) |> +# tidyr::unnest(cols = c(x, y, d, p, q)) |> # dplyr::ungroup() # -# q_vec <- stats::quantile(df$y, probs = seq(0, 1, 1 / (n - 1)), type = 1) %>% -# dplyr::as_tibble() %>% +# q_vec <- stats::quantile(df$y, probs = seq(0, 1, 1 / (n - 1)), type = 1) |> +# dplyr::as_tibble() |> # dplyr::rename("q" = "value") # -# df <- df %>% +# df <- df |> # dplyr::mutate(q = q_vec$q) # # attr(df, ".x") <- .x diff --git a/R/est-param-bernoulli.R b/R/est-param-bernoulli.R index 84d89a2f..dd00146b 100644 --- a/R/est-param-bernoulli.R +++ b/R/est-param-bernoulli.R @@ -25,12 +25,12 @@ #' library(dplyr) #' library(ggplot2) #' -#' tb <- tidy_bernoulli(.prob = .1) %>% pull(y) +#' tb <- tidy_bernoulli(.prob = .1) |> pull(y) #' output <- util_bernoulli_param_estimate(tb) #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-beta.R b/R/est-param-beta.R index 7cebaa96..bfbbd4a2 100644 --- a/R/est-param-beta.R +++ b/R/est-param-beta.R @@ -38,7 +38,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' tb <- rbeta(50, 2.5, 1.4) diff --git a/R/est-param-binomial.R b/R/est-param-binomial.R index b371ef36..fd412152 100644 --- a/R/est-param-binomial.R +++ b/R/est-param-binomial.R @@ -32,7 +32,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-burr.R b/R/est-param-burr.R index f04a14cd..54d5259e 100644 --- a/R/est-param-burr.R +++ b/R/est-param-burr.R @@ -25,12 +25,12 @@ #' library(dplyr) #' library(ggplot2) #' -#' tb <- tidy_burr(.shape1 = 1, .shape2 = 2, .rate = .3) %>% pull(y) +#' tb <- tidy_burr(.shape1 = 1, .shape2 = 2, .rate = .3) |> pull(y) #' output <- util_burr_param_estimate(tb) #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-cauchy.R b/R/est-param-cauchy.R index 1b2b7a12..b06dc23a 100644 --- a/R/est-param-cauchy.R +++ b/R/est-param-cauchy.R @@ -28,7 +28,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-exponential.R b/R/est-param-exponential.R index 22340cd7..06d07d20 100644 --- a/R/est-param-exponential.R +++ b/R/est-param-exponential.R @@ -23,12 +23,12 @@ #' library(dplyr) #' library(ggplot2) #' -#' te <- tidy_exponential(.rate = .1) %>% pull(y) +#' te <- tidy_exponential(.rate = .1) |> pull(y) #' output <- util_exponential_param_estimate(te) #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-gamma.R b/R/est-param-gamma.R index e2fa35d3..778b8d7a 100644 --- a/R/est-param-gamma.R +++ b/R/est-param-gamma.R @@ -23,12 +23,12 @@ #' library(dplyr) #' library(ggplot2) #' -#' tg <- tidy_gamma(.shape = 1, .scale = .3) %>% pull(y) +#' tg <- tidy_gamma(.shape = 1, .scale = .3) |> pull(y) #' output <- util_gamma_param_estimate(tg) #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-geometric.R b/R/est-param-geometric.R index 0d315805..3ca12d44 100644 --- a/R/est-param-geometric.R +++ b/R/est-param-geometric.R @@ -25,12 +25,12 @@ #' library(dplyr) #' library(ggplot2) #' -#' tg <- tidy_geometric(.prob = .1) %>% pull(y) +#' tg <- tidy_geometric(.prob = .1) |> pull(y) #' output <- util_geometric_param_estimate(tg) #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-hypergeometric.R b/R/est-param-hypergeometric.R index ebce317c..c187138c 100644 --- a/R/est-param-hypergeometric.R +++ b/R/est-param-hypergeometric.R @@ -44,7 +44,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/est-param-logistic.R b/R/est-param-logistic.R index f39700a7..4c356b03 100644 --- a/R/est-param-logistic.R +++ b/R/est-param-logistic.R @@ -33,7 +33,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' t <- rlogis(50, 2.5, 1.4) diff --git a/R/est-param-lognormal.R b/R/est-param-lognormal.R index 39509f13..125f2675 100644 --- a/R/est-param-lognormal.R +++ b/R/est-param-lognormal.R @@ -32,10 +32,10 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' -#' tb <- tidy_lognormal(.meanlog = 2, .sdlog = 1) %>% pull(y) +#' tb <- tidy_lognormal(.meanlog = 2, .sdlog = 1) |> pull(y) #' util_lognormal_param_estimate(tb)$parameter_tbl #' #' @return diff --git a/R/est-param-negative-binomial.R b/R/est-param-negative-binomial.R index 24b652df..0ec22dea 100644 --- a/R/est-param-negative-binomial.R +++ b/R/est-param-negative-binomial.R @@ -33,7 +33,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' t <- rnbinom(50, 1, .1) diff --git a/R/est-param-normal.R b/R/est-param-normal.R index 75f5cddb..6182f6da 100644 --- a/R/est-param-normal.R +++ b/R/est-param-normal.R @@ -32,7 +32,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' t <- rnorm(50, 0, 1) diff --git a/R/est-param-pareto.R b/R/est-param-pareto.R index d7fd31ae..5e51a665 100644 --- a/R/est-param-pareto.R +++ b/R/est-param-pareto.R @@ -32,10 +32,10 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' -#' t <- tidy_pareto(50, 1, 1) %>% pull(y) +#' t <- tidy_pareto(50, 1, 1) |> pull(y) #' util_pareto_param_estimate(t)$parameter_tbl #' #' @return diff --git a/R/est-param-poisson.R b/R/est-param-poisson.R index 6c9a7487..320fb2b9 100644 --- a/R/est-param-poisson.R +++ b/R/est-param-poisson.R @@ -28,7 +28,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' t <- rpois(50, 5) diff --git a/R/est-param-uniform.R b/R/est-param-uniform.R index 4f0aed6e..5902d7d5 100644 --- a/R/est-param-uniform.R +++ b/R/est-param-uniform.R @@ -28,7 +28,7 @@ #' #' output$parameter_tbl #' -#' output$combined_data_tbl %>% +#' output$combined_data_tbl |> #' tidy_combined_autoplot() #' #' @return diff --git a/R/palette-color-blind.R b/R/palette-color-blind.R index d88bbafc..20ba2b3f 100644 --- a/R/palette-color-blind.R +++ b/R/palette-color-blind.R @@ -19,7 +19,7 @@ color_blind <- function() { #' @export td_scale_fill_colorblind <- function(..., theme = "td") { pal <- switch(theme, - "td" = unname(color_blind()) %>% rep(100) + "td" = unname(color_blind()) |> rep(100) ) ggplot2::scale_fill_manual(values = pal) @@ -33,7 +33,7 @@ td_scale_fill_colorblind <- function(..., theme = "td") { #' @export td_scale_color_colorblind <- function(..., theme = "td") { pal <- switch(theme, - "td" = unname(color_blind()) %>% rep(100) + "td" = unname(color_blind()) |> rep(100) ) ggplot2::scale_color_manual(values = pal) diff --git a/R/plot-bootstrap-stat.R b/R/plot-bootstrap-stat.R index 46729c00..2804a01c 100644 --- a/R/plot-bootstrap-stat.R +++ b/R/plot-bootstrap-stat.R @@ -42,10 +42,10 @@ #' @examples #' x <- mtcars$mpg #' -#' tidy_bootstrap(x) %>% +#' tidy_bootstrap(x) |> #' bootstrap_stat_plot(y, "cmean") #' -#' tidy_bootstrap(x, .num_sims = 10) %>% +#' tidy_bootstrap(x, .num_sims = 10) |> #' bootstrap_stat_plot(y, #' .stat = "chmean", .show_groups = TRUE, #' .show_ci_label = FALSE @@ -99,7 +99,7 @@ bootstrap_stat_plot <- function(.data, .value, .stat = "cmean", # Data ---- if (atb$tibble_type == "tidy_bootstrap_nested") { - df_tbl <- dplyr::as_tibble(.data) %>% + df_tbl <- dplyr::as_tibble(.data) |> TidyDensity::bootstrap_unnest_tbl() } @@ -109,8 +109,8 @@ bootstrap_stat_plot <- function(.data, .value, .stat = "cmean", # Manipulation if (show_groups) { - df_tbl <- df_tbl %>% - dplyr::group_by(sim_number) %>% + df_tbl <- df_tbl |> + dplyr::group_by(sim_number) |> dplyr::mutate( stat = switch(stat_fn, "cmean" = TidyDensity::cmean(y), @@ -126,17 +126,17 @@ bootstrap_stat_plot <- function(.data, .value, .stat = "cmean", "cskewness" = TidyDensity::cskewness(y), "ckurtosis" = TidyDensity::ckurtosis(y) ) - ) %>% - dplyr::mutate(x = dplyr::row_number()) %>% - dplyr::ungroup() %>% - dplyr::group_by(x) %>% - dplyr::mutate(cil = TidyDensity::ci_lo(stat, .na_rm = TRUE)) %>% - dplyr::mutate(cih = TidyDensity::ci_hi(stat, .na_rm = TRUE)) %>% - dplyr::mutate(mstat = mean(stat, na.rm = TRUE)) %>% + ) |> + dplyr::mutate(x = dplyr::row_number()) |> + dplyr::ungroup() |> + dplyr::group_by(x) |> + dplyr::mutate(cil = TidyDensity::ci_lo(stat, .na_rm = TRUE)) |> + dplyr::mutate(cih = TidyDensity::ci_hi(stat, .na_rm = TRUE)) |> + dplyr::mutate(mstat = mean(stat, na.rm = TRUE)) |> dplyr::ungroup() } else { - df_tbl <- df_tbl %>% - dplyr::group_by(sim_number) %>% + df_tbl <- df_tbl |> + dplyr::group_by(sim_number) |> dplyr::mutate( stat = switch(stat_fn, "cmean" = TidyDensity::cmean(y), @@ -152,15 +152,15 @@ bootstrap_stat_plot <- function(.data, .value, .stat = "cmean", "cskewness" = TidyDensity::cskewness(y), "ckurtosis" = TidyDensity::ckurtosis(y) ) - ) %>% - dplyr::mutate(x = dplyr::row_number()) %>% - dplyr::ungroup() %>% - dplyr::group_by(x) %>% + ) |> + dplyr::mutate(x = dplyr::row_number()) |> + dplyr::ungroup() |> + dplyr::group_by(x) |> dplyr::summarise( cil = TidyDensity::ci_lo(stat, .na_rm = TRUE), cih = TidyDensity::ci_hi(stat, .na_rm = TRUE), stat = mean(stat, na.rm = TRUE) - ) %>% + ) |> dplyr::ungroup() } @@ -183,7 +183,7 @@ bootstrap_stat_plot <- function(.data, .value, .stat = "cmean", sub_title <- paste0("Cumulative Statistic: ", y_txt) cap <- paste0("Simulations: ", atb$.num_sims) if (show_groups) { - p <- df_tbl %>% + p <- df_tbl |> ggplot2::ggplot(ggplot2::aes(x = x, y = stat, group = sim_number)) + ggplot2::geom_line(color = "lightgray") + ggplot2::geom_line(ggplot2::aes(y = mstat), @@ -206,7 +206,7 @@ bootstrap_stat_plot <- function(.data, .value, .stat = "cmean", caption = cap ) } else { - p <- df_tbl %>% + p <- df_tbl |> ggplot2::ggplot(ggplot2::aes(x = x, y = stat)) + ggplot2::geom_line(color = "red", linetype = "dashed") + ggplot2::geom_line(ggplot2::aes(y = cil), diff --git a/R/stats-bernoulli-tbl.R b/R/stats-bernoulli-tbl.R index 56329c72..dab3b78f 100644 --- a/R/stats-bernoulli-tbl.R +++ b/R/stats-bernoulli-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_bernoulli() %>% -#' util_bernoulli_stats_tbl() %>% +#' tidy_bernoulli() |> +#' util_bernoulli_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-beta-tbl.R b/R/stats-beta-tbl.R index b72640eb..6ac55163 100644 --- a/R/stats-beta-tbl.R +++ b/R/stats-beta-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_beta() %>% -#' util_beta_stats_tbl() %>% +#' tidy_beta() |> +#' util_beta_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-binomial-tbl.R b/R/stats-binomial-tbl.R index 945ff5a0..962003cf 100644 --- a/R/stats-binomial-tbl.R +++ b/R/stats-binomial-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_binomial() %>% -#' util_binomial_stats_tbl() %>% +#' tidy_binomial() |> +#' util_binomial_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-burr-tbl.R b/R/stats-burr-tbl.R index f2268ee8..dac88618 100644 --- a/R/stats-burr-tbl.R +++ b/R/stats-burr-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_burr() %>% -#' util_burr_stats_tbl() %>% +#' tidy_burr() |> +#' util_burr_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-cauchy-tbl.R b/R/stats-cauchy-tbl.R index f72cff43..07ecae02 100644 --- a/R/stats-cauchy-tbl.R +++ b/R/stats-cauchy-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_cauchy() %>% -#' util_cauchy_stats_tbl() %>% +#' tidy_cauchy() |> +#' util_cauchy_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-chisquare-tbl.R b/R/stats-chisquare-tbl.R index 91ee161b..c0c541b8 100644 --- a/R/stats-chisquare-tbl.R +++ b/R/stats-chisquare-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_chisquare() %>% -#' util_chisquare_stats_tbl() %>% +#' tidy_chisquare() |> +#' util_chisquare_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-exponential-tbl.R b/R/stats-exponential-tbl.R index a6982b59..4bcaa4ad 100644 --- a/R/stats-exponential-tbl.R +++ b/R/stats-exponential-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_exponential() %>% -#' util_exponential_stats_tbl() %>% +#' tidy_exponential() |> +#' util_exponential_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-f-tbl.R b/R/stats-f-tbl.R index 4006b914..d8ec01a4 100644 --- a/R/stats-f-tbl.R +++ b/R/stats-f-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_f() %>% -#' util_f_stats_tbl() %>% +#' tidy_f() |> +#' util_f_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-gamma-tbl.R b/R/stats-gamma-tbl.R index 588cef36..8812ae2a 100644 --- a/R/stats-gamma-tbl.R +++ b/R/stats-gamma-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_gamma() %>% -#' util_gamma_stats_tbl() %>% +#' tidy_gamma() |> +#' util_gamma_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-geometric-tbl.R b/R/stats-geometric-tbl.R index 90c90f23..537f8025 100644 --- a/R/stats-geometric-tbl.R +++ b/R/stats-geometric-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_geometric() %>% -#' util_geometric_stats_tbl() %>% +#' tidy_geometric() |> +#' util_geometric_stats_tbl() |> #' glimpse() #' #' @return @@ -50,9 +50,9 @@ util_geometric_stats_tbl <- function(.data) { p <- atb$.prob stat_mean <- (1 - p) / p - stat_mode <- data_tbl %>% - dplyr::filter(p == max(p)) %>% - dplyr::pull(y) %>% + stat_mode <- data_tbl |> + dplyr::filter(p == max(p)) |> + dplyr::pull(y) |> max() stat_sd <- sqrt((1 - p) / p) stat_skewness <- (2 - p) / sqrt(1 - p) diff --git a/R/stats-hypergeometric-tbl.R b/R/stats-hypergeometric-tbl.R index cdb52e95..e2ac8e68 100644 --- a/R/stats-hypergeometric-tbl.R +++ b/R/stats-hypergeometric-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_hypergeometric() %>% -#' util_hypergeometric_stats_tbl() %>% +#' tidy_hypergeometric() |> +#' util_hypergeometric_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-logistic-tbl.R b/R/stats-logistic-tbl.R index 6c5c8822..9a71b12d 100644 --- a/R/stats-logistic-tbl.R +++ b/R/stats-logistic-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_logistic() %>% -#' util_logistic_stats_tbl() %>% +#' tidy_logistic() |> +#' util_logistic_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-lognormal-tbl.R b/R/stats-lognormal-tbl.R index 491e7758..517f9ded 100644 --- a/R/stats-lognormal-tbl.R +++ b/R/stats-lognormal-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_lognormal() %>% -#' util_lognormal_stats_tbl() %>% +#' tidy_lognormal() |> +#' util_lognormal_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-negative-binomial-tbl.R b/R/stats-negative-binomial-tbl.R index d1afe521..6fa7644a 100644 --- a/R/stats-negative-binomial-tbl.R +++ b/R/stats-negative-binomial-tbl.R @@ -17,8 +17,8 @@ #' @examples #' library(dplyr) #' -#' tidy_negative_binomial() %>% -#' util_negative_binomial_stats_tbl() %>% +#' tidy_negative_binomial() |> +#' util_negative_binomial_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-normal-tbl.R b/R/stats-normal-tbl.R index c5b91438..fc2e1f21 100644 --- a/R/stats-normal-tbl.R +++ b/R/stats-normal-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_normal() %>% -#' util_normal_stats_tbl() %>% +#' tidy_normal() |> +#' util_normal_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-pareto-tbl.R b/R/stats-pareto-tbl.R index fc2c3806..7e72268e 100644 --- a/R/stats-pareto-tbl.R +++ b/R/stats-pareto-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_pareto() %>% -#' util_pareto_stats_tbl() %>% +#' tidy_pareto() |> +#' util_pareto_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-poisson-tbl.R b/R/stats-poisson-tbl.R index cf23a0ca..b39379ba 100644 --- a/R/stats-poisson-tbl.R +++ b/R/stats-poisson-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_poisson() %>% -#' util_poisson_stats_tbl() %>% +#' tidy_poisson() |> +#' util_poisson_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-t-tbl.R b/R/stats-t-tbl.R index 1b4d1b89..cd69121c 100644 --- a/R/stats-t-tbl.R +++ b/R/stats-t-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_t() %>% -#' util_t_stats_tbl() %>% +#' tidy_t() |> +#' util_t_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-tidy-stat-func-tbl.R b/R/stats-tidy-stat-func-tbl.R index 91cd84a7..6fa07df3 100644 --- a/R/stats-tidy-stat-func-tbl.R +++ b/R/stats-tidy-stat-func-tbl.R @@ -107,13 +107,13 @@ tidy_stat_tbl <- function(.data, .x = y, .fns, .return_type = "vector", # # Benchmark ran 25 at 15.13 seconds # # Thank you Akrun https://stackoverflow.com/questions/73938515/keep-names-from-quantile-function-when-used-in-a-data-table/73938561#73938561 if (atb$tibble_type == "tidy_bootstrap_nested") { - dt <- dplyr::as_tibble(.data) %>% - TidyDensity::bootstrap_unnest_tbl() %>% - dplyr::select(sim_number, {{ value_var_expr }}) %>% + dt <- dplyr::as_tibble(.data) |> + TidyDensity::bootstrap_unnest_tbl() |> + dplyr::select(sim_number, {{ value_var_expr }}) |> data.table::as.data.table() } else { - dt <- dplyr::as_tibble(.data) %>% - dplyr::select(sim_number, {{ value_var_expr }}) %>% + dt <- dplyr::as_tibble(.data) |> + dplyr::select(sim_number, {{ value_var_expr }}) |> data.table::as.data.table() } @@ -123,9 +123,9 @@ tidy_stat_tbl <- function(.data, .x = y, .fns, .return_type = "vector", dt[, as.list(func(.SD[[1]], ...)), by = sim_number, .SDcols = .x], id.var = "sim_number", value.name = func_chr - ) %>% - dplyr::as_tibble() %>% - dplyr::arrange(sim_number, variable) %>% + ) |> + dplyr::as_tibble() |> + dplyr::arrange(sim_number, variable) |> dplyr::rename(name = variable) return(ret) @@ -134,24 +134,24 @@ tidy_stat_tbl <- function(.data, .x = y, .fns, .return_type = "vector", # Check to see if it is a bootstrap tibble first # Is it a Bootstrap Nested tibble? if (atb$tibble_type == "tidy_bootstrap_nested") { - df_tbl <- dplyr::as_tibble(.data) %>% - TidyDensity::bootstrap_unnest_tbl() %>% - split(.$sim_number) %>% - purrr::map(.f = ~ .x %>% dplyr::pull(y)) + df_tbl <- dplyr::as_tibble(.data) |> + TidyDensity::bootstrap_unnest_tbl() + df_tbl <- base::split(df_tbl, df_tbl$sim_number) |> + purrr::map(\(x) x |> dplyr::pull(y)) } # Is it an unnested bootstrap tibble? if (atb$tibble_type == "tidy_bootstrap") { - df_tbl <- dplyr::as_tibble(.data) %>% - split(.$sim_number) %>% - purrr::map(.f = ~ .x %>% dplyr::pull(y)) + df_tbl <- dplyr::as_tibble(.data) + df_tbl <- base::split(df_tbl, df_tbl$sim_number) |> + purrr::map(\(x) x |> dplyr::pull(y)) } # If regular tidy_ dist tibble ---- if (!atb$tibble_type %in% c("tidy_bootstrap", "tidy_bootstrap_nested")) { - df_tbl <- dplyr::as_tibble(.data) %>% - split(.$sim_number) %>% - purrr::map(.f = ~ .x %>% dplyr::pull({{ value_var_expr }})) + df_tbl <- dplyr::as_tibble(.data) + df_tbl <- base::split(df_tbl, df_tbl$sim_number) |> + purrr::map(\(x) x |> dplyr::pull({{ value_var_expr }})) } # New Param Args ---- @@ -205,22 +205,22 @@ tidy_stat_tbl <- function(.data, .x = y, .fns, .return_type = "vector", ) if (is.null(args)) { - ret <- ret %>% - purrr::map(~ cbind(.x, name = names(.x))) %>% - purrr::imap(~ cbind(.x, sim_number = .y)) %>% - purrr::map_df(dplyr::as_tibble) %>% - dplyr::select(sim_number, .x, dplyr::everything()) %>% - dplyr::mutate(.x = as.numeric(.x)) %>% - dplyr::mutate(sim_number = factor(sim_number)) %>% + ret <- ret |> + purrr::map(~ cbind(.x, name = names(.x))) |> + purrr::imap(~ cbind(.x, sim_number = .y)) |> + purrr::map_df(dplyr::as_tibble) |> + dplyr::select(sim_number, .x, dplyr::everything()) |> + dplyr::mutate(.x = as.numeric(.x)) |> + dplyr::mutate(sim_number = factor(sim_number)) |> dplyr::rename(value = .x) } else { - ret <- ret %>% - purrr::map(~ cbind(.x, name = names(.x))) %>% - purrr::imap(.f = ~ cbind(.x, sim_number = .y)) %>% - purrr::map_df(dplyr::as_tibble) %>% - dplyr::select(sim_number, .x, dplyr::everything()) %>% - dplyr::mutate(.x = as.numeric(.x)) %>% - dplyr::mutate(sim_number = factor(sim_number)) %>% + ret <- ret |> + purrr::map(~ cbind(.x, name = names(.x))) |> + purrr::imap(.f = ~ cbind(.x, sim_number = .y)) |> + purrr::map_df(dplyr::as_tibble) |> + dplyr::select(sim_number, .x, dplyr::everything()) |> + dplyr::mutate(.x = as.numeric(.x)) |> + dplyr::mutate(sim_number = factor(sim_number)) |> dplyr::rename(value = .x) } @@ -228,13 +228,13 @@ tidy_stat_tbl <- function(.data, .x = y, .fns, .return_type = "vector", if ("name" %in% names(ret)) { names(ret) <- cn } else { - ret <- ret %>% + ret <- ret |> dplyr::mutate(name = 1) names(ret) <- cn } - ret <- ret %>% dplyr::select(sim_number, name, dplyr::everything()) + ret <- ret |> dplyr::select(sim_number, name, dplyr::everything()) } # Return diff --git a/R/stats-uniform-tbl.R b/R/stats-uniform-tbl.R index 9bd2c259..c142c664 100644 --- a/R/stats-uniform-tbl.R +++ b/R/stats-uniform-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_uniform() %>% -#' util_uniform_stats_tbl() %>% +#' tidy_uniform() |> +#' util_uniform_stats_tbl() |> #' glimpse() #' #' @return diff --git a/R/stats-weibull-tbl.R b/R/stats-weibull-tbl.R index 8be7e19c..025e73f2 100644 --- a/R/stats-weibull-tbl.R +++ b/R/stats-weibull-tbl.R @@ -16,8 +16,8 @@ #' @examples #' library(dplyr) #' -#' tidy_weibull() %>% -#' util_weibull_stats_tbl() %>% +#' tidy_weibull() |> +#' util_weibull_stats_tbl() |> #' glimpse() #' #' @return diff --git a/man/bootstrap_density_augment.Rd b/man/bootstrap_density_augment.Rd index e7c5b62d..33b270de 100644 --- a/man/bootstrap_density_augment.Rd +++ b/man/bootstrap_density_augment.Rd @@ -29,11 +29,11 @@ those functions. \examples{ x <- mtcars$mpg -tidy_bootstrap(x) \%>\% +tidy_bootstrap(x) |> bootstrap_density_augment() -tidy_bootstrap(x) \%>\% - bootstrap_unnest_tbl() \%>\% +tidy_bootstrap(x) |> + bootstrap_unnest_tbl() |> bootstrap_density_augment() } diff --git a/man/bootstrap_p_augment.Rd b/man/bootstrap_p_augment.Rd index 5beab799..b9109d1a 100644 --- a/man/bootstrap_p_augment.Rd +++ b/man/bootstrap_p_augment.Rd @@ -27,8 +27,8 @@ tibble. } \examples{ x <- mtcars$mpg -tidy_bootstrap(x) \%>\% - bootstrap_unnest_tbl() \%>\% +tidy_bootstrap(x) |> + bootstrap_unnest_tbl() |> bootstrap_p_augment(y) } diff --git a/man/bootstrap_q_augment.Rd b/man/bootstrap_q_augment.Rd index 4cffe071..5db82dcf 100644 --- a/man/bootstrap_q_augment.Rd +++ b/man/bootstrap_q_augment.Rd @@ -28,8 +28,8 @@ tibble. \examples{ x <- mtcars$mpg -tidy_bootstrap(x) \%>\% - bootstrap_unnest_tbl() \%>\% +tidy_bootstrap(x) |> + bootstrap_unnest_tbl() |> bootstrap_q_augment(y) } diff --git a/man/bootstrap_stat_plot.Rd b/man/bootstrap_stat_plot.Rd index c7224be5..2b300d6f 100644 --- a/man/bootstrap_stat_plot.Rd +++ b/man/bootstrap_stat_plot.Rd @@ -61,10 +61,10 @@ cumulative functions that can be applied to the data.The accepted values are: \examples{ x <- mtcars$mpg -tidy_bootstrap(x) \%>\% +tidy_bootstrap(x) |> bootstrap_stat_plot(y, "cmean") -tidy_bootstrap(x, .num_sims = 10) \%>\% +tidy_bootstrap(x, .num_sims = 10) |> bootstrap_stat_plot(y, .stat = "chmean", .show_groups = TRUE, .show_ci_label = FALSE diff --git a/man/bootstrap_unnest_tbl.Rd b/man/bootstrap_unnest_tbl.Rd index ae74046e..70b64483 100644 --- a/man/bootstrap_unnest_tbl.Rd +++ b/man/bootstrap_unnest_tbl.Rd @@ -26,7 +26,7 @@ not work unless the data comes from that function. tb <- tidy_bootstrap(.x = mtcars$mpg) bootstrap_unnest_tbl(tb) -bootstrap_unnest_tbl(tb) \%>\% +bootstrap_unnest_tbl(tb) |> tidy_distribution_summary_tbl(sim_number) } diff --git a/man/tidy_combined_autoplot.Rd b/man/tidy_combined_autoplot.Rd index 72f3cd2c..351df3d7 100644 --- a/man/tidy_combined_autoplot.Rd +++ b/man/tidy_combined_autoplot.Rd @@ -77,10 +77,10 @@ combined_tbl <- tidy_combine_distributions( combined_tbl -combined_tbl \%>\% +combined_tbl |> tidy_combined_autoplot() -combined_tbl \%>\% +combined_tbl |> tidy_combined_autoplot(.plot_type = "qq") } diff --git a/man/tidy_four_autoplot.Rd b/man/tidy_four_autoplot.Rd index 9da351c7..409edd59 100644 --- a/man/tidy_four_autoplot.Rd +++ b/man/tidy_four_autoplot.Rd @@ -67,7 +67,7 @@ This function will spit out one of the following plots: } } \examples{ -tidy_normal(.num_sims = 5) \%>\% +tidy_normal(.num_sims = 5) |> tidy_four_autoplot() } diff --git a/man/tidy_multi_dist_autoplot.Rd b/man/tidy_multi_dist_autoplot.Rd index 4a0b0d74..d896eabc 100644 --- a/man/tidy_multi_dist_autoplot.Rd +++ b/man/tidy_multi_dist_autoplot.Rd @@ -80,10 +80,10 @@ tn <- tidy_multi_single_dist( ) ) -tn \%>\% +tn |> tidy_multi_dist_autoplot() -tn \%>\% +tn |> tidy_multi_dist_autoplot(.plot_type = "qq") } diff --git a/man/tidy_random_walk_autoplot.Rd b/man/tidy_random_walk_autoplot.Rd index e7754f05..a857093d 100644 --- a/man/tidy_random_walk_autoplot.Rd +++ b/man/tidy_random_walk_autoplot.Rd @@ -45,12 +45,12 @@ This function will produce a simple random walk plot from a \code{tidy_} distribution function. } \examples{ -tidy_normal(.sd = .1, .num_sims = 5) \%>\% - tidy_random_walk(.value_type = "cum_sum") \%>\% +tidy_normal(.sd = .1, .num_sims = 5) |> + tidy_random_walk(.value_type = "cum_sum") |> tidy_random_walk_autoplot() -tidy_normal(.sd = .1, .num_sims = 20) \%>\% - tidy_random_walk(.value_type = "cum_sum", .sample = TRUE, .replace = TRUE) \%>\% +tidy_normal(.sd = .1, .num_sims = 20) |> + tidy_random_walk(.value_type = "cum_sum", .sample = TRUE, .replace = TRUE) |> tidy_random_walk_autoplot() } diff --git a/man/util_bernoulli_param_estimate.Rd b/man/util_bernoulli_param_estimate.Rd index d7742ade..403ac337 100644 --- a/man/util_bernoulli_param_estimate.Rd +++ b/man/util_bernoulli_param_estimate.Rd @@ -33,12 +33,12 @@ It will attempt to estimate the prob parameter of a Bernoulli distribution. library(dplyr) library(ggplot2) -tb <- tidy_bernoulli(.prob = .1) \%>\% pull(y) +tb <- tidy_bernoulli(.prob = .1) |> pull(y) output <- util_bernoulli_param_estimate(tb) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_bernoulli_stats_tbl.Rd b/man/util_bernoulli_stats_tbl.Rd index 19f50c9d..d2bc02ca 100644 --- a/man/util_bernoulli_stats_tbl.Rd +++ b/man/util_bernoulli_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_bernoulli() \%>\% - util_bernoulli_stats_tbl() \%>\% +tidy_bernoulli() |> + util_bernoulli_stats_tbl() |> glimpse() } diff --git a/man/util_beta_param_estimate.Rd b/man/util_beta_param_estimate.Rd index 28e314d1..b525ca5d 100644 --- a/man/util_beta_param_estimate.Rd +++ b/man/util_beta_param_estimate.Rd @@ -48,7 +48,7 @@ output <- util_beta_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() tb <- rbeta(50, 2.5, 1.4) diff --git a/man/util_beta_stats_tbl.Rd b/man/util_beta_stats_tbl.Rd index 4f18c8f6..c07bf032 100644 --- a/man/util_beta_stats_tbl.Rd +++ b/man/util_beta_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_beta() \%>\% - util_beta_stats_tbl() \%>\% +tidy_beta() |> + util_beta_stats_tbl() |> glimpse() } diff --git a/man/util_binomial_param_estimate.Rd b/man/util_binomial_param_estimate.Rd index c64f111a..61975ad0 100644 --- a/man/util_binomial_param_estimate.Rd +++ b/man/util_binomial_param_estimate.Rd @@ -41,7 +41,7 @@ output <- util_binomial_param_estimate(tb) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_binomial_stats_tbl.Rd b/man/util_binomial_stats_tbl.Rd index de1b7397..d85b78e8 100644 --- a/man/util_binomial_stats_tbl.Rd +++ b/man/util_binomial_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_binomial() \%>\% - util_binomial_stats_tbl() \%>\% +tidy_binomial() |> + util_binomial_stats_tbl() |> glimpse() } diff --git a/man/util_burr_param_estimate.Rd b/man/util_burr_param_estimate.Rd index 1c53fa1b..4517a5af 100644 --- a/man/util_burr_param_estimate.Rd +++ b/man/util_burr_param_estimate.Rd @@ -33,12 +33,12 @@ It will attempt to estimate the prob parameter of a Burr distribution. library(dplyr) library(ggplot2) -tb <- tidy_burr(.shape1 = 1, .shape2 = 2, .rate = .3) \%>\% pull(y) +tb <- tidy_burr(.shape1 = 1, .shape2 = 2, .rate = .3) |> pull(y) output <- util_burr_param_estimate(tb) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_burr_stats_tbl.Rd b/man/util_burr_stats_tbl.Rd index c488cc65..84a424d2 100644 --- a/man/util_burr_stats_tbl.Rd +++ b/man/util_burr_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_burr() \%>\% - util_burr_stats_tbl() \%>\% +tidy_burr() |> + util_burr_stats_tbl() |> glimpse() } diff --git a/man/util_cauchy_param_estimate.Rd b/man/util_cauchy_param_estimate.Rd index 4ada3012..6718707f 100644 --- a/man/util_cauchy_param_estimate.Rd +++ b/man/util_cauchy_param_estimate.Rd @@ -36,7 +36,7 @@ output <- util_cauchy_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_cauchy_stats_tbl.Rd b/man/util_cauchy_stats_tbl.Rd index 5c6bffb8..3e50bbb7 100644 --- a/man/util_cauchy_stats_tbl.Rd +++ b/man/util_cauchy_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_cauchy() \%>\% - util_cauchy_stats_tbl() \%>\% +tidy_cauchy() |> + util_cauchy_stats_tbl() |> glimpse() } diff --git a/man/util_chisquare_stats_tbl.Rd b/man/util_chisquare_stats_tbl.Rd index 110cb9a4..4fa5c460 100644 --- a/man/util_chisquare_stats_tbl.Rd +++ b/man/util_chisquare_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_chisquare() \%>\% - util_chisquare_stats_tbl() \%>\% +tidy_chisquare() |> + util_chisquare_stats_tbl() |> glimpse() } diff --git a/man/util_exponential_param_estimate.Rd b/man/util_exponential_param_estimate.Rd index b2429472..f2782947 100644 --- a/man/util_exponential_param_estimate.Rd +++ b/man/util_exponential_param_estimate.Rd @@ -31,12 +31,12 @@ This function will see if the given vector \code{.x} is a numeric vector. library(dplyr) library(ggplot2) -te <- tidy_exponential(.rate = .1) \%>\% pull(y) +te <- tidy_exponential(.rate = .1) |> pull(y) output <- util_exponential_param_estimate(te) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_exponential_stats_tbl.Rd b/man/util_exponential_stats_tbl.Rd index 0a14cacd..b273e2ad 100644 --- a/man/util_exponential_stats_tbl.Rd +++ b/man/util_exponential_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_exponential() \%>\% - util_exponential_stats_tbl() \%>\% +tidy_exponential() |> + util_exponential_stats_tbl() |> glimpse() } diff --git a/man/util_f_stats_tbl.Rd b/man/util_f_stats_tbl.Rd index 068e4d44..38b949be 100644 --- a/man/util_f_stats_tbl.Rd +++ b/man/util_f_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_f() \%>\% - util_f_stats_tbl() \%>\% +tidy_f() |> + util_f_stats_tbl() |> glimpse() } diff --git a/man/util_gamma_param_estimate.Rd b/man/util_gamma_param_estimate.Rd index a7de4780..93fd5a32 100644 --- a/man/util_gamma_param_estimate.Rd +++ b/man/util_gamma_param_estimate.Rd @@ -31,12 +31,12 @@ This function will see if the given vector \code{.x} is a numeric vector. library(dplyr) library(ggplot2) -tg <- tidy_gamma(.shape = 1, .scale = .3) \%>\% pull(y) +tg <- tidy_gamma(.shape = 1, .scale = .3) |> pull(y) output <- util_gamma_param_estimate(tg) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_gamma_stats_tbl.Rd b/man/util_gamma_stats_tbl.Rd index 7547239d..b76c9cd7 100644 --- a/man/util_gamma_stats_tbl.Rd +++ b/man/util_gamma_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_gamma() \%>\% - util_gamma_stats_tbl() \%>\% +tidy_gamma() |> + util_gamma_stats_tbl() |> glimpse() } diff --git a/man/util_geometric_param_estimate.Rd b/man/util_geometric_param_estimate.Rd index 14848b51..a0110b89 100644 --- a/man/util_geometric_param_estimate.Rd +++ b/man/util_geometric_param_estimate.Rd @@ -33,12 +33,12 @@ It will attempt to estimate the prob parameter of a geometric distribution. library(dplyr) library(ggplot2) -tg <- tidy_geometric(.prob = .1) \%>\% pull(y) +tg <- tidy_geometric(.prob = .1) |> pull(y) output <- util_geometric_param_estimate(tg) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_geometric_stats_tbl.Rd b/man/util_geometric_stats_tbl.Rd index 359416b0..8da7644f 100644 --- a/man/util_geometric_stats_tbl.Rd +++ b/man/util_geometric_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_geometric() \%>\% - util_geometric_stats_tbl() \%>\% +tidy_geometric() |> + util_geometric_stats_tbl() |> glimpse() } diff --git a/man/util_hypergeometric_param_estimate.Rd b/man/util_hypergeometric_param_estimate.Rd index 3fcca644..db2eba52 100644 --- a/man/util_hypergeometric_param_estimate.Rd +++ b/man/util_hypergeometric_param_estimate.Rd @@ -61,7 +61,7 @@ output <- util_hypergeometric_param_estimate(th, .total = 50, .k = 5) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_hypergeometric_stats_tbl.Rd b/man/util_hypergeometric_stats_tbl.Rd index 2e35f055..0575d6b4 100644 --- a/man/util_hypergeometric_stats_tbl.Rd +++ b/man/util_hypergeometric_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_hypergeometric() \%>\% - util_hypergeometric_stats_tbl() \%>\% +tidy_hypergeometric() |> + util_hypergeometric_stats_tbl() |> glimpse() } diff --git a/man/util_logistic_param_estimate.Rd b/man/util_logistic_param_estimate.Rd index 926b922b..07ec4651 100644 --- a/man/util_logistic_param_estimate.Rd +++ b/man/util_logistic_param_estimate.Rd @@ -43,7 +43,7 @@ output <- util_logistic_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() t <- rlogis(50, 2.5, 1.4) diff --git a/man/util_logistic_stats_tbl.Rd b/man/util_logistic_stats_tbl.Rd index 6266ab12..af13f4e2 100644 --- a/man/util_logistic_stats_tbl.Rd +++ b/man/util_logistic_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_logistic() \%>\% - util_logistic_stats_tbl() \%>\% +tidy_logistic() |> + util_logistic_stats_tbl() |> glimpse() } diff --git a/man/util_lognormal_param_estimate.Rd b/man/util_lognormal_param_estimate.Rd index 99f27e5f..fda9cb42 100644 --- a/man/util_lognormal_param_estimate.Rd +++ b/man/util_lognormal_param_estimate.Rd @@ -42,10 +42,10 @@ output <- util_lognormal_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() -tb <- tidy_lognormal(.meanlog = 2, .sdlog = 1) \%>\% pull(y) +tb <- tidy_lognormal(.meanlog = 2, .sdlog = 1) |> pull(y) util_lognormal_param_estimate(tb)$parameter_tbl } diff --git a/man/util_lognormal_stats_tbl.Rd b/man/util_lognormal_stats_tbl.Rd index d28ac994..fcb2904a 100644 --- a/man/util_lognormal_stats_tbl.Rd +++ b/man/util_lognormal_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_lognormal() \%>\% - util_lognormal_stats_tbl() \%>\% +tidy_lognormal() |> + util_lognormal_stats_tbl() |> glimpse() } diff --git a/man/util_negative_binomial_param_estimate.Rd b/man/util_negative_binomial_param_estimate.Rd index b35d2c69..652cd139 100644 --- a/man/util_negative_binomial_param_estimate.Rd +++ b/man/util_negative_binomial_param_estimate.Rd @@ -44,7 +44,7 @@ output <- util_negative_binomial_param_estimate(x, .size = 1) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() t <- rnbinom(50, 1, .1) diff --git a/man/util_negative_binomial_stats_tbl.Rd b/man/util_negative_binomial_stats_tbl.Rd index b792ad8f..36dd0438 100644 --- a/man/util_negative_binomial_stats_tbl.Rd +++ b/man/util_negative_binomial_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_negative_binomial() \%>\% - util_negative_binomial_stats_tbl() \%>\% +tidy_negative_binomial() |> + util_negative_binomial_stats_tbl() |> glimpse() } diff --git a/man/util_normal_param_estimate.Rd b/man/util_normal_param_estimate.Rd index 9ff461de..9c8ea52c 100644 --- a/man/util_normal_param_estimate.Rd +++ b/man/util_normal_param_estimate.Rd @@ -42,7 +42,7 @@ output <- util_normal_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() t <- rnorm(50, 0, 1) diff --git a/man/util_normal_stats_tbl.Rd b/man/util_normal_stats_tbl.Rd index 2895e2e5..af87fcb1 100644 --- a/man/util_normal_stats_tbl.Rd +++ b/man/util_normal_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_normal() \%>\% - util_normal_stats_tbl() \%>\% +tidy_normal() |> + util_normal_stats_tbl() |> glimpse() } diff --git a/man/util_pareto_param_estimate.Rd b/man/util_pareto_param_estimate.Rd index 221ddc34..9d5a77f4 100644 --- a/man/util_pareto_param_estimate.Rd +++ b/man/util_pareto_param_estimate.Rd @@ -42,10 +42,10 @@ output <- util_pareto_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() -t <- tidy_pareto(50, 1, 1) \%>\% pull(y) +t <- tidy_pareto(50, 1, 1) |> pull(y) util_pareto_param_estimate(t)$parameter_tbl } diff --git a/man/util_pareto_stats_tbl.Rd b/man/util_pareto_stats_tbl.Rd index 997aa7fe..390e0a68 100644 --- a/man/util_pareto_stats_tbl.Rd +++ b/man/util_pareto_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_pareto() \%>\% - util_pareto_stats_tbl() \%>\% +tidy_pareto() |> + util_pareto_stats_tbl() |> glimpse() } diff --git a/man/util_poisson_param_estimate.Rd b/man/util_poisson_param_estimate.Rd index aa3f983b..1015d134 100644 --- a/man/util_poisson_param_estimate.Rd +++ b/man/util_poisson_param_estimate.Rd @@ -36,7 +36,7 @@ output <- util_poisson_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() t <- rpois(50, 5) diff --git a/man/util_poisson_stats_tbl.Rd b/man/util_poisson_stats_tbl.Rd index 4963b57a..b6470eaf 100644 --- a/man/util_poisson_stats_tbl.Rd +++ b/man/util_poisson_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_poisson() \%>\% - util_poisson_stats_tbl() \%>\% +tidy_poisson() |> + util_poisson_stats_tbl() |> glimpse() } diff --git a/man/util_t_stats_tbl.Rd b/man/util_t_stats_tbl.Rd index c280a24c..a2517a1c 100644 --- a/man/util_t_stats_tbl.Rd +++ b/man/util_t_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_t() \%>\% - util_t_stats_tbl() \%>\% +tidy_t() |> + util_t_stats_tbl() |> glimpse() } diff --git a/man/util_uniform_param_estimate.Rd b/man/util_uniform_param_estimate.Rd index 370260cf..83f44362 100644 --- a/man/util_uniform_param_estimate.Rd +++ b/man/util_uniform_param_estimate.Rd @@ -36,7 +36,7 @@ output <- util_uniform_param_estimate(x) output$parameter_tbl -output$combined_data_tbl \%>\% +output$combined_data_tbl |> tidy_combined_autoplot() } diff --git a/man/util_uniform_stats_tbl.Rd b/man/util_uniform_stats_tbl.Rd index 6906dd5b..ae1554e6 100644 --- a/man/util_uniform_stats_tbl.Rd +++ b/man/util_uniform_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_uniform() \%>\% - util_uniform_stats_tbl() \%>\% +tidy_uniform() |> + util_uniform_stats_tbl() |> glimpse() } diff --git a/man/util_weibull_stats_tbl.Rd b/man/util_weibull_stats_tbl.Rd index 816f814c..3dd6b5db 100644 --- a/man/util_weibull_stats_tbl.Rd +++ b/man/util_weibull_stats_tbl.Rd @@ -23,8 +23,8 @@ passed from a \code{tidy_} distribution function. \examples{ library(dplyr) -tidy_weibull() \%>\% - util_weibull_stats_tbl() \%>\% +tidy_weibull() |> + util_weibull_stats_tbl() |> glimpse() }