Skip to content

Commit

Permalink
play with tibble printing
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Jan 10, 2018
1 parent a36baee commit 96ae9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ seq.units = function(from, to, by = ((to - from)/(length.out - 1)),
#' @name tibble
#' @param x see \link[pillar]{type_sum}
#' @param ... see \link[pillar]{type_sum}
#' @param
#' @export
type_sum.units <- function(x, ...) {
paste0("[", as.character(units(x)), "]")
Expand All @@ -165,5 +164,6 @@ pillar_shaft.units <- function(x, ...) {
if (! requireNamespace("pillar", quietly = TRUE))
stop("package pillar not available: install first?")
out <- paste(format(unclass(x), ...), pillar::style_subtle(u_char))
#out <- format(unclass(x), ...)
pillar::new_pillar_shaft_simple(out, align = "right", min_width = 8)
}

0 comments on commit 96ae9bb

Please sign in to comment.