format_numbers_at: Format numeric columns for display

Description Usage Arguments Value See Also Examples

Description

Combines mutate_at() and as_formatted_number()

Usage

1
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

format_p_values_at

Examples

1
2
3
4
5
library(tibble)
library(magrittr)
library(dplyr)
tibble(a=c(0.1, 0.238546)) %>%
    format_numbers_at(vars(a))

tidytidbits documentation built on March 8, 2021, 5:07 p.m.