-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
It feels like an NA should just propagate here. I encountered this while implementing a format method (well, technically, a pillar_shaft() method).
x <- month.name
cli::ansi_strtrim(x, width = 3)
#> <ansi_string>
#> [1] Ja…
#> [2] Fe…
#> [3] Ma…
#> [4] Ap…
#> [5] Ma
#> [6] Ju…
#> [7] Ju…
#> [8] Au…
#> [9] Se…
#> [10] Oc…
#> [11] No…
#> [12] De…
x[2] <- NA
cli::ansi_strtrim(x, width = 3)
#> Error in ansi_substr(xt[bad], 1, ansi_nchar(xt[bad]) - 1L): non-numeric substring arguments not supportedCreated on 2021-07-06 by the reprex package (v2.0.0.9000)
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior