mtcars %>%
tabyl(am, cyl) %>%
adorn_percentages("col") %>%
adorn_pct_formatting()
# Control the columns to be adorned with the ... variable selection argument
# If using only the ... argument, you can use empty commas as shorthand
# to supply the default values to the preceding arguments:
cases <- data.frame(
region = c("East", "West"),
year = 2015,
recovered = c(125, 87),
died = c(13, 12)
)
cases %>%
adorn_percentages("col",,recovered:died) %>%
adorn_pct_formatting(,,,recovered:died)
Run the code above in your browser using DataLab