1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 21:01:57 +02:00

(v1.3.0.9007) tibble printing

This commit is contained in:
2020-08-26 11:33:54 +02:00
parent c8c8bb4e3a
commit 5e45fdcf2a
64 changed files with 266 additions and 77 deletions

View File

@ -114,6 +114,22 @@ is.disk <- function(x) {
inherits(x, "disk")
}
#' @method pillar_shaft disk
#' @export
pillar_shaft.disk <- function(x, ...) {
style_na <- import_fn("style_na", "pillar", error_on_fail = FALSE)
new_pillar_shaft_simple <- import_fn("new_pillar_shaft_simple", "pillar", error_on_fail = FALSE)
out <- trimws(format(x))
out[is.na(x)] <- style_na(NA)
new_pillar_shaft_simple(out, align = "right", min_width = 3)
}
#' @method type_sum disk
#' @export
type_sum.disk <- function(x, ...) {
"disk"
}
#' @method print disk
#' @export
#' @noRd