Skip to content

Commit

Permalink
fixed digit check bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Rinker committed Mar 21, 2017
1 parent 04263f0 commit e8205ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/f_bills.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ f_mills <- function(x, relative = 0, digits = -6, prefix = "", ...) {
x <- gsub("^0.", ".", paste0(round(x, digits)/1e+06, "M"))
}

digit_warn(x, 'f_bills')
digit_warn(x, 'f_bills', 6)
paste0(prefix, ifelse(x == '.', '0M', x))

}
Expand Down Expand Up @@ -151,7 +151,7 @@ digit_check <- function(x, digits = 3){
}

digit_warn <- function(x, next_ver = "f_mills", digits = 3){
if (digit_check(x)) {
if (digit_check(x, digits)) {
warning(paste0(
"Detected one or more elements with a larger denomination.\n Consider using `",
next_ver,
Expand Down

0 comments on commit e8205ac

Please sign in to comment.