Вы можете использовать пакет quanteda.Пример на основе их документации https://quanteda.io/reference/textplot_wordcloud.html
library(quanteda)
#convert readLines input to a token object
tok <- tokens(unlist(sample.lines))
#convert the token object to a frequency matrix
dfmat1 <- dfm(tok,
remove = stopwords("english"), #remove stopwords (if wanted)
remove_punct = TRUE, #remove punctuation (if wanted)
tolower = T, #(change all to lowercase (if wanted)
removeNumbers = TRUE) %>% #remove numbers (if wanted)
dfm_trim(min_termfreq = 4) #eliminate frequencies lower than 4 (if wanted)
# basic wordcloud
textplot_wordcloud(dfmat1)
# plot in colors with some additional options
textplot_wordcloud(dfmat1, rotation = 0.25,
color = rev(RColorBrewer::brewer.pal(10, "RdBu")))
# other display options
col <- sapply(seq(0.1, 1, 0.1), function(x) adjustcolor("#1F78B4", x))
textplot_wordcloud(dfmat1, adjust = 0.5, random_order = FALSE,
color = col, rotation = FALSE)