mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 05:00:50 +01:00
(v1.3.0.9010) S3 extensions without dependencies
This commit is contained in:
1 parent
81af0b001c
commit
74a172ef55
49 files changed
+227
-156
No files matched your search
@@ -114,18 +114,14 @@ is.disk <- function(x) {
|
||||
inherits(x, "disk")
|
||||
}
|
||||
|
||||
#' @method pillar_shaft disk
|
||||
#' @export
|
||||
# will be exported using s3_register() in R/zzz.R
|
||||
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)
|
||||
out[is.na(x)] <- font_na(NA)
|
||||
create_pillar_column(out, align = "right", width = 2)
|
||||
}
|
||||
|
||||
#' @method type_sum disk
|
||||
#' @export
|
||||
# will be exported using s3_register() in R/zzz.R
|
||||
type_sum.disk <- function(x, ...) {
|
||||
"disk"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user