Skip to content

Commit

Permalink
accomodate pillar 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Jul 15, 2018
1 parent e13a1ab commit 3c32401
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Suggests:
measurements,
xml2,
tibble,
pillar,
pillar (>= 1.3.0),
knitr,
testthat,
ggforce,
Expand Down
3 changes: 2 additions & 1 deletion R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ type_sum.units <- function(x, ...) {
}
#' @export
#' @name tibble
format_type_sum.type_sum_units <- function(x) {
#' @param width ignored
format_type_sum.type_sum_units <- function(x, width, ...) {
if (! requireNamespace("pillar", quietly = TRUE))
stop("package pillar not available: install first?")
pillar::style_subtle(x)
Expand Down
4 changes: 2 additions & 2 deletions R/symbolic_units.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ to_base <- function(x) { # https://github.com/r-quantities/units/issues/132
return(value)
}

if (isTRUE(units_options("convert_to_base")))
return(to_base(value))
# if (isTRUE(units_options("convert_to_base")))
# return(to_base(value))

# This is just a brute force implementation that takes each element in the
# numerator and tries to find a value in the denominator that can be converted
Expand Down
4 changes: 3 additions & 1 deletion man/tibble.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 comments on commit 3c32401

@Enchufa2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit needs to be merged into master, which is broken since pillar v1.3.0, but I'm not sure if this branch is ready to be merged (maybe you intended to put this commit into master?).

@edzer
Copy link
Member Author

@edzer edzer commented on 3c32401 Jul 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this branch is ready to be merged.

Please sign in to comment.