format_numbers_at {tidytidbits} | R Documentation |
Format numeric columns for display
Description
Combines mutate_at()
and as_formatted_number()
Usage
format_numbers_at(.tbl, .vars, decimal_places = 1, remove_trailing_zeroes = T)
Arguments
.tbl |
A data frame |
.vars |
A vars() list of symbolic columns |
decimal_places |
Decimal places to display |
remove_trailing_zeroes |
If the required decimal places are less than decimal places, should resulting trailing zeros be removed? |
Value
Value of mutate_at
See Also
Examples
library(tibble)
library(magrittr)
library(dplyr)
tibble(a=c(0.1, 0.238546)) %>%
format_numbers_at(vars(a))
[Package tidytidbits version 0.3.2 Index]