Skip to contents

Return a commentary snippet for any decimal value. Formats the number as a percentage point difference and provides simple up/down commentary

Usage

single_pp(x, description = "up", abbr = TRUE, unchanged_limit, ...)

Arguments

x

a numeric value, as a decimal value. E.g. 10pp would be passed as 0.1.

description

code of descriptive words used in commentary. Defaults to "up"; up/down/unchanged.

abbr

logical, whether you would like the units abbreviated to pp. Defaults to TRUE.

unchanged_limit

numeric, the value below which you consider the parameter to not represent a change in either direction. Defaults to 0.01.

...

additional arguments to pass to the round function

Value

Returns a brief commentary (including the figure for increases or decreases) as a string