tibble::tibble(
y = seq(1000L, 10000L, by = 1000L),
z = c(-.59, -.23, -.11, 0, .1, .21, .3, .4, .6, .9),
w = c(.1, 1.4, .23, -.10, 0, -2.3, .2,.3,.4,.5)) -> tbl1
tbl1
# automatically formats the integer column
tbl1 %>%
format_number()
# automatically formats to yen
tbl1 %>%
format_currency(y)
# automatically detects columns between -1 and 1 to convert to percentages
tbl1 %>%
format_percent()
# select specific columns to convert.
tbl1 %>%
format_percent(z, w)
Run the code above in your browser using DataLab