This seems like a simple question, but I can't seem to find an answer anywhere. In the R {wordcloud} package, the wordcloud function, there is a scale value that you can enter. The full documentation (here: https://cran.r-project.org/web/packages/wordcloud/wordcloud.pdf) says: "A vector of length 2 indicating the range of the size of the words."
I can't seem to make any sense of the values though, and I can't find any other documentation. For instance, examples have scale=c(4,.5) or scale=c(8,.3). What do these numbers mean?
I've messed around with different values a bit, but I can't seem to figure out the pattern. Thanks in advance for any help, Seth
wordcloud internally calculates
size <- (scale[1] - scale[2]) * normedFreq + scale[2]
where the 2 elements of size are used to set strheight and strwidth. These are graphics values described as follows:
These functions compute the width or height, respectively, of the given strings or mathematical expressions s[i] on the current plotting device in user coordinates, inches or as fraction of the figure width par("fin").
So, long story short, it's height and width.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With