View source: R/keyword_group.R
keyword_group | R Documentation |
Create a tbl_graph
(a class provided by tidygraph) from the tidy table with document ID and keyword.
Each entry(row) should contain only one keyword in the tidy format.This function would automatically computes
the frequency and classification group number of nodes representing keywords.
keyword_group( dt, id = "id", keyword = "keyword", top = 200, min_freq = 1, com_detect_fun = group_fast_greedy )
dt |
A data.frame containing at least two columns with document ID and keyword. |
id |
Quoted characters specifying the column name of document ID.Default uses "id". |
keyword |
Quoted characters specifying the column name of keyword.Default uses "keyword". |
top |
The number of keywords selected with the largest frequency. If there is a tie,more than top entries would be selected. |
min_freq |
Minimum occurrence of selected keywords.Default uses 1. |
com_detect_fun |
Community detection function,provided by tidygraph(wrappers around clustering
functions provided by igraph), see |
This function receives a tidy table with document ID and keyword.Only top keywords with largest frequency would be selected and the minimum occurrence of keywords could be specified. For suggestions of community detection algorithm, see the references provided below.
A tbl_graph, representing the keyword co-occurence network with frequency and group number of the keywords.
de Sousa, Fabiano Berardo, and Liang Zhao. "Evaluating and comparing the igraph community detection algorithms." 2014 Brazilian Conference on Intelligent Systems. IEEE, 2014.
Yang, Z., Algesheimer, R., & Tessone, C. J. (2016). A comparative analysis of community detection algorithms on artificial networks. Scientific reports, 6, 30750.
tbl_graph
, group_graph
library(akc) bibli_data_table %>% keyword_clean(id = "id",keyword = "keyword") %>% keyword_group(id = "id",keyword = "keyword") # use 'louvain' algorithm for community detection bibli_data_table %>% keyword_clean(id = "id",keyword = "keyword") %>% keyword_group(id = "id",keyword = "keyword", com_detect_fun = group_louvain) # get more alternatives by searching '?tidygraph::group_graph'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.