Skip to contents

All functions

date_name()
Format a date into a consistent human-readable format
number_change()
Return a commentary snippet for one or more values. Formats the numbers as a comma separated numeric and provides simple up/down commentary
percent_change()
Return a commentary snippet for one or more decimal values. Formats the numbers as a percentage and provides simple up/down commentary
pp_change()
Return a commentary snippet for one or more decimal values. Formats the numbers as percentage points and provides simple up/down commentary
round()
Round numbers according to statistical principles rather than data science ones i.e. numbers ending in a 5 will always be rounded up, regardless of preceeding number
show_format()
Return a data table of the description codes and examples of their use
single_number()
Return a commentary snippet for any number value. Formats the number with comma separation and provides simple up/down commentary
single_percent()
Return a commentary snippet for any decimal value. Formats the number as a percentage and provides simple up/down commentary
single_pp()
Return a commentary snippet for any decimal value. Formats the number as a percentage point difference and provides simple up/down commentary
smart_paste()
Paste together objects based on how many of them there are Uses commas between everything except the last value
top_x()
From a data frame, returns the top n values from a named column based on the values in another column, and pastes them together in a grammatically correct string. Ideal for commentary which aims to describe e.g. "the top 3 values of X were for the following regions:"
top_x_percent()
From a data frame, returns the top n values from a named column based on the values in another column, and pastes them together in a grammatically correct string. Ideal for commentary which aims to describe e.g. "the top 3 values of X were for the following regions:"