doc_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 document and keyword in the tidy format.This function would
group the documents.
doc_group( dt, id = "id", keyword = "keyword", 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". |
com_detect_fun |
Community detection function,provided by tidygraph(wrappers around clustering
functions provided by igraph), see |
As we could classify keywords using document ID, we could also classify documents with keywords. In the output network, the nodes are documents and the edges mean the two documents share same keywords with each other.
A tbl_graph, representing the document relation network based on keyword co-occurrence.
library(akc) bibli_data_table %>% keyword_clean(id = "id",keyword = "keyword") %>% doc_group(id = "id",keyword = "keyword") -> grouped_doc grouped_doc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.