(v0.7.1.9036) preserve ab/mo classes in subsetting

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-08-12 14:48:09 +02:00
1 parent 1d423cca89
commit bd252a2984
23 files changed
+237 -181

No files matched your search

+14
View File
@@ -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)
}