View source: R/keyword_cloud.R
keyword_cloud | R Documentation |
This function should be used to plot the object exported by
keyword_group
. It could draw a robust word cloud of keywords.
keyword_cloud(tibble_graph, group_no = NULL, top = 50, max_size = 20)
tibble_graph |
A |
group_no |
If one wants to visualize a specific group, gives the group number.
Default uses |
top |
How many top keywords (by frequency) should be plot? Default uses 50. |
max_size |
Size of largest keyword.Default uses 20. |
In the output graph, the size of keywords is proportional to the keyword
frequency, keywords in different colours belong to different group. For advanced
usage of word cloud, use ggwordcloud directly with the grouped keywords
yielded by keyword_group
.
keyword_group
,
geom_text_wordcloud_area
library(dplyr) library(akc) bibli_data_table %>% keyword_clean(id = "id",keyword = "keyword") %>% keyword_group(id = "id",keyword = "keyword") -> grouped_keyword grouped_keyword %>% keyword_cloud() grouped_keyword %>% keyword_cloud(group_no = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.