If you provide an object with more than one class then the first if condition in wordcloud2 produces a warning. This is especially true with tidyr tibbles that are both tibbles and data .frames
wordcounts %>% mutate(freq=n) %>% wordcloud2(minSize=6)
Warning message:
In if (class(data) == "table") { :
the condition has length > 1 and only the first element will be used
The pull request changes the condition such that it looks for a table somewhere in the vector of classes.
If you provide an object with more than one class then the first
if
condition inwordcloud2
produces a warning. This is especially true withtidyr
tibbles that are both tibbles anddata .frames
The pull request changes the condition such that it looks for a table somewhere in the vector of classes.