mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 23:21:56 +02:00
(v0.7.1.9036) preserve ab/mo classes in subsetting
This commit is contained in:
14
R/disk.R
14
R/disk.R
@ -90,3 +90,17 @@ print.disk <- function(x, ...) {
|
||||
cat("Class 'disk'\n")
|
||||
print(as.integer(x), quote = FALSE)
|
||||
}
|
||||
|
||||
#' @importFrom pillar type_sum
|
||||
#' @export
|
||||
type_sum.disk <- function(x) {
|
||||
"disk"
|
||||
}
|
||||
|
||||
#' @importFrom pillar pillar_shaft
|
||||
#' @export
|
||||
pillar_shaft.disk <- function(x, ...) {
|
||||
out <- trimws(format(x))
|
||||
out[is.na(x)] <- pillar::style_na(NA)
|
||||
pillar::new_pillar_shaft_simple(out, align = "right", min_width = 3)
|
||||
}
|
||||
|
Reference in New Issue
Block a user