Description Usage Arguments Examples
When numeric answer options have a "more" value, it substitutes more with the largest explicit number, or the largest explicit number multiplied by an increase factor. If the increase factor is less than 1.0 it can be used to moderate the smallest value for "less" or similar statements among numeric answers.
1 | moderate_more(x, moderate = 999, increase = 1, rounding = 0)
|
x |
A numeric vector where "more" or other values have to be replaced. |
moderate |
The threshold to start moderation. |
increase |
Do you want to increase/decrease the last explicit value?
Defaults to |
rounding |
Should the increased/decreased values be rounded? Defaults to rounding to
nearest integer value with |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | raw_column <- c("12", "20", "3", "more")
raw_column <- ifelse ( raw_column == "more",
yes = "999",
no = raw_column )
raw_column <- as.numeric ( raw_column )
moderate_more ( x = raw_column,
moderate = 999,
increase = 1.0,
rounding = 0 )
moderate_more ( x = raw_column,
moderate = 999,
increase = 1.26,
rounding = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.