(v3.0.0.9027) skimr update and as.ab warning - fixes #234, fixes #232

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2025-09-10 13:32:52 +02:00
1 parent d5a568318b
commit 4d7c4ca52c
13 files changed
+92 -58

No files matched your search

+7 -5
View File
@@ -236,12 +236,14 @@ rep.disk <- function(x, ...) {
# this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, disk)
get_skimmers.disk <- function(column) {
column <- as.integer(column)
skimr::sfl(
skim_type = "disk",
min = ~ min(as.double(.), na.rm = TRUE),
max = ~ max(as.double(.), na.rm = TRUE),
median = ~ stats::median(as.double(.), na.rm = TRUE),
n_unique = ~ length(unique(stats::na.omit(.))),
hist = ~ skimr::inline_hist(stats::na.omit(as.double(.)))
p0 = ~ stats::quantile(column, probs = 0, na.rm = TRUE, names = FALSE),
p25 = ~ stats::quantile(column, probs = 0.25, na.rm = TRUE, names = FALSE),
p50 = ~ stats::quantile(column, probs = 0.5, na.rm = TRUE, names = FALSE),
p75 = ~ stats::quantile(column, probs = 0.75, na.rm = TRUE, names = FALSE),
p100 = ~ stats::quantile(column, probs = 1, na.rm = TRUE, names = FALSE),
hist = ~ skimr::inline_hist(stats::na.omit(column), 10)
)
}