Skip to content

Commit 2ec1c29

Browse files
authored
Merge pull request #2108 from rstudio/fix-info-fmt-tf
feat: add the `info_tf_style()` function
2 parents c80627d + 7a04219 commit 2ec1c29

17 files changed

+714
-13
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export(info_google_fonts)
168168
export(info_icons)
169169
export(info_locales)
170170
export(info_paletteer)
171+
export(info_tf_style)
171172
export(info_time_style)
172173
export(info_unit_conversions)
173174
export(latex)

R/format_data.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5694,7 +5694,9 @@ format_bins_by_context <- function(x, sep, fmt, context) {
56945694
#' these options for `tf_style` are locale-aware through the `locale` option,
56955695
#' so, a `"yes"` value will instead be `"ja"` when `locale = "de"`. Options
56965696
#' 4 through to 10 involve pairs of symbols (e.g., `"check-mark"` displays
5697-
#' a check mark for `TRUE` and an X symbol for `FALSE`).
5697+
#' a check mark for `TRUE` and an X symbol for `FALSE`). There are 10
5698+
#' `TRUE`/`FALSE` styles and their short names can be viewed using
5699+
#' [info_tf_style()].
56985700
#'
56995701
#' @param true_val *Text to use for `TRUE` values*
57005702
#'
@@ -5807,6 +5809,9 @@ format_bins_by_context <- function(x, sep, fmt, context) {
58075809
#' | 9 | `"triangles"` | `<Black Up-Pointing Triangle>`, `<Black Down-Pointing Triangle>`|
58085810
#' | 10 | `"triangles-lr"`| `<Heavy Check Mark>`, `<Heavy Ballot X>` |
58095811
#'
5812+
#' We can use the [info_tf_style()] function to view a similar table of
5813+
#' `TRUE`/`FALSE` styles with example output.
5814+
#'
58105815
#' @section Adapting output to a specific `locale`:
58115816
#'
58125817
#' This formatting function can adapt outputs according to a provided `locale`

0 commit comments

Comments
 (0)