Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrandin committed Oct 21, 2024
1 parent c8e59db commit c4e2e9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ is_dfo <- function() {
# }

factor_bin_clean <- function(x, bins, clean = TRUE) {

out <- bins[findInterval(x, bins, rightmost.closed = TRUE)]
max_char <- max(nchar(out))
ndec <- ndecimals(out)
Expand Down Expand Up @@ -119,8 +120,9 @@ factor_clean <- function(x) {
}

ndecimals <- function(x) {

ndec <- nchar(lapply(strsplit(as.character(x),
options("OutDec")),
paste0("\\", options("OutDec"))),
\(x) x[2]))

if (!all(is.na(ndec))) {
Expand Down

0 comments on commit c4e2e9e

Please sign in to comment.