keyword_cloud: Draw word cloud for grouped keywords

View source: R/keyword_cloud.R

keyword_cloudR Documentation

Draw word cloud for grouped keywords

Description

This function should be used to plot the object exported by keyword_group. It could draw a robust word cloud of keywords.

Usage

keyword_cloud(tibble_graph, group_no = NULL, top = 50, max_size = 20)

Arguments

tibble_graph

A tbl_graph output by keyword_group.

group_no

If one wants to visualize a specific group, gives the group number. Default uses NULL,which returns all the groups.

top

How many top keywords (by frequency) should be plot? Default uses 50.

max_size

Size of largest keyword.Default uses 20.

Details

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.

See Also

keyword_group, geom_text_wordcloud_area

Examples


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)

hope-data-science/akc documentation built on Feb. 8, 2023, 8:49 a.m.