1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 05:41:59 +02:00

(v1.3.0.9032) support skimr

This commit is contained in:
2020-09-28 01:08:55 +02:00
parent 22f6ceb3e4
commit 519aada54f
25 changed files with 123 additions and 30 deletions

View File

@ -186,3 +186,17 @@ unique.disk <- function(x, incomparables = FALSE, ...) {
attributes(y) <- attributes(x)
y
}
# will be exported using s3_register() in R/zzz.R
get_skimmers.disk <- function(column) {
sfl <- import_fn("sfl", "skimr", error_on_fail = FALSE)
inline_hist <- import_fn("inline_hist", "skimr", error_on_fail = FALSE)
sfl(
skim_type = "disk",
smallest = ~min(as.double(.), na.rm = TRUE),
largest = ~max(as.double(.), na.rm = TRUE),
median = ~stats::median(as.double(.), na.rm = TRUE),
n_unique = n_unique,
hist = ~inline_hist(stats::na.omit(as.double(.)))
)
}