Skip to content

Commit

Permalink
Update style_sigfig.R
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Apr 19, 2024
1 parent 52727bb commit 828c43d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/style_sigfig.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ style_sigfig <- function(x, digits = 2, scale = 1, big.mark = NULL, decimal.mark
"< 10^(", 1:digits - 1, ") - 0.5 * 10^(", -(digits:1), ") ~ ", digits:1,
collapse = ", "
) %>%
{
paste0("dplyr::case_when(", ., ", TRUE ~ 0)")
} %>%
{paste0("dplyr::case_when(", ., ", TRUE ~ 0)")} %>% # styler: off
# converting strings into expressions to run
parse(text = .) %>%
eval()
Expand Down

0 comments on commit 828c43d

Please sign in to comment.