1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 23:21:56 +02:00

(v0.7.1.9027) tibble printing

This commit is contained in:
2019-08-07 15:37:39 +02:00
parent 14c47da656
commit 90c874025a
42 changed files with 946 additions and 602 deletions

16
R/ab.R
View File

@ -262,7 +262,7 @@ is.ab <- function(x) {
#' @noRd
print.ab <- function(x, ...) {
cat("Class 'ab'\n")
print.default(as.character(x), quote = FALSE)
print(as.character(x), quote = FALSE)
}
#' @exportMethod as.data.frame.ab
@ -286,3 +286,17 @@ as.data.frame.ab <- function (x, ...) {
pull.ab <- function(.data, ...) {
pull(as.data.frame(.data), ...)
}
#' @importFrom pillar type_sum
#' @export
type_sum.ab <- function(x) {
"ab"
}
#' @importFrom pillar pillar_shaft
#' @export
pillar_shaft.ab <- function(x, ...) {
out <- format(x)
out[is.na(x)] <- NA
pillar::new_pillar_shaft_simple(out, align = "left", min_width = 4)
}