A repository for the R functions used to create the simplified word clouds described in Maurits et al 2022 (link to manuscript). Included are also the survey used in the study (Supplementary File I) and the sensitivity analysis results (Supplementary File II)
- Download the Function.r file in /R and place in your working directory
- Read the functions into your R session using
source("/Functions.r") - Make sure you have installed and loaded the required dependencies
The functions plotCloudSA() and plotCloudST() respectively scale words by their surface area and their font size, using the same optional parameters.
max_wordsdetermines the maximum number of words to include in the plot (integer)ordermakes it so the most frequent word is on the bottom and the least frequent on the top (logical)fontdetermines extra font attributes, 1 = normal, 2 = bold, 3 = italic and 4 = both bold & italicpartyassigns random colours to words (logical)capdetermines whether words are in all-caps ("all"), no-caps ("none"), or as provided ("as.is")
Input data should be of the format:
| word | freq |
|---|---|
| Pizza | 15 |
| Spons | 30 |
| Gozer | 60 |
| Krimp | 120 |
| Joker | 240 |
The below images were created using the Script.r file in /R on the identical included example data
Font size scaling method
Surface area scaling method

