Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: bestNormalize
Type: Package
Title: Normalizing Transformation Functions
Version: 1.9.1.9000
Date: 2023-09-20
Authors@R: person("Ryan Andrew", "Peterson",
Date: 2025-11-29
Authors@R: person("Ryan A", "Peterson",
email = "ryan.a.peterson@cuanschutz.edu",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-4650-5798"))
Expand Down Expand Up @@ -40,6 +40,7 @@ Imports:
methods,
butcher,
purrr,
progress,
generics
Suggests:
knitr,
Expand All @@ -54,5 +55,5 @@ Suggests:
covr
VignetteBuilder: knitr
LazyData: true
RoxygenNote: 7.3.1
RoxygenNote: 7.3.3
Encoding: UTF-8
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ importFrom(graphics,lines)
importFrom(graphics,plot)
importFrom(graphics,points)
importFrom(methods,is)
importFrom(progress,progress_bar)
importFrom(purrr,map)
importFrom(recipes,add_step)
importFrom(recipes,bake)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- adding `lambert` of type "hh" as option when `allow_lambert_h` is set to
`TRUE`, per request from
[issue 24](https://github.com/petersonR/bestNormalize/issues/24)
- fixing deprecation of `dplyr::progress_estimated` (#26)

# bestNormalize 1.9.1

Expand Down
13 changes: 11 additions & 2 deletions R/bestNormalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@
#'
#' @seealso \code{\link[bestNormalize]{boxcox}}, \code{\link{orderNorm}},
#' \code{\link{yeojohnson}}
#'
#' @importFrom progress progress_bar
#'
#' @export
bestNormalize <- function(x,
standardize = TRUE,
Expand Down Expand Up @@ -391,7 +394,13 @@ get_oos_estimates <- function(x, standardize, norm_methods, k, r,
# Perform in this session if cluster unspecified
if(is.null(cluster)) {

if(!quiet & length(x) > 2000) pb <- dplyr::progress_estimated(r*k)
if(!quiet & length(x) > 2000) {
pb <- progress::progress_bar$new(
format = " computing [:bar] :percent eta: :eta",
total = k * r,
width = 60
)
}

reps <- lapply(1:r, function(rep) {
resamples <- create_folds(x, k)
Expand All @@ -409,7 +418,7 @@ get_oos_estimates <- function(x, standardize, norm_methods, k, r,
pstats[i, m] <- suppressWarnings(do.call(norm_stat_fn, list(x = vec)))
}
}
if(!quiet & length(x) > 2000) pb$tick()$print()
if(!quiet & length(x) > 2000) pb$tick()
}
colnames(pstats) <- norm_methods
rownames(pstats) <- paste0("Rep", rep, "Fold", 1:k)
Expand Down
2 changes: 1 addition & 1 deletion man/bestNormalize-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading