View source: R/annotation_table.R
make_annotation_labels | R Documentation |
This function looks in a character column for a regex that indicates whether a row is a percentage or a whole number. It then prettily formats the contents of a numeric column as either a percentage or a comma-separated int.
make_annotation_labels(.x, .rate_key = "Rate")
.x |
a tibble with fields “Measure“ and “Value“. |
.rate_key |
a string in the Measure name that indicates a percentage |
a tibble with a new column, “Label“, that is formatted.
make_annotation_labels(
tibble::tribble(~Measure, ~Value,
"R", 0.5,
"K", 1000,
"A", 42),
"R"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.