mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 08:32:04 +02:00
(v1.3.0.9010) S3 extensions without dependencies
This commit is contained in:
12
R/mic.R
12
R/mic.R
@ -171,18 +171,14 @@ droplevels.mic <- function(x, exclude = ifelse(anyNA(levels(x)), NULL, NA), ...)
|
||||
x
|
||||
}
|
||||
|
||||
#' @method pillar_shaft mic
|
||||
#' @export
|
||||
# will be exported using s3_register() in R/zzz.R
|
||||
pillar_shaft.mic <- 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 = 4)
|
||||
out[is.na(x)] <- font_na(NA)
|
||||
create_pillar_column(out, align = "right", min_width = 4)
|
||||
}
|
||||
|
||||
#' @method type_sum mic
|
||||
#' @export
|
||||
# will be exported using s3_register() in R/zzz.R
|
||||
type_sum.mic <- function(x, ...) {
|
||||
"mic"
|
||||
}
|
||||
|
Reference in New Issue
Block a user