Skip to content

Commit

Permalink
avoid failure on non-unicode platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Oct 25, 2024
1 parent 9008adc commit 6b9b438
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/label-number.R
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,17 @@ cut_time_scale <- function(space = FALSE) {
out <- c(
0,
"ns" = 1e-9,
"\u03BCs" = 1e-6,
"us" = 1e-6,
"ms" = 1e-3,
"s" = 1,
"m" = 60,
"h" = 3600,
"d" = 24 * 3600,
"w" = 7 * 24 * 3600
)
if (l10n_info()[["UTF-8"]]) {
names(out)[3] <- "\u03BCs"
}
if (space) {
names(out) <- paste0(" ", names(out))
}
Expand Down

0 comments on commit 6b9b438

Please sign in to comment.