Skip to content

Commit

Permalink
Update random-tidy-normal.R
Browse files Browse the repository at this point in the history
towards #301
  • Loading branch information
spsanderson committed Oct 10, 2022
1 parent cf141e4 commit ece3c6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/random-tidy-normal.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ tidy_normal <- function(.n = 50, .mean = 0, .sd = 1, .num_sims = 1) {
dplyr::mutate(d = list(density(unlist(y), n = n)[c("x", "y")] %>%
purrr::set_names("dx", "dy") %>%
dplyr::as_tibble())) %>%
dplyr::mutate(p = list(stats::pnorm(ps, mu, std))) %>%
dplyr::mutate(q = list(stats::qnorm(tidy_scale_zero_one_vec(unlist(y)), mu, std))) %>%
dplyr::mutate(p = list(stats::pnorm(unlist(y), mu, std))) %>%
dplyr::mutate(q = list(stats::qnorm(unlist(p), mu, std))) %>%
# dplyr::mutate(p = list(stats::pnorm(ps, mu, std))) %>%
# dplyr::mutate(q = list(stats::qnorm(tidy_scale_zero_one_vec(unlist(y)), mu, std))) %>%
tidyr::unnest(cols = c(x, y, d, p, q)) %>%
dplyr::ungroup()

Expand Down

0 comments on commit ece3c6d

Please sign in to comment.