as_document_network: Create a document similarity network

View source: R/networks.r

as_document_networkR Documentation

Create a document similarity network

Description

This function can be used to structure the output of the compare_documents function as an igraph network.

Usage

as_document_network(el)

Arguments

el

An RNewsflow_edgelist object, as created with compare_documents.

Value

A network/graph in the igraph class

Examples

dtm = quanteda::dfm_tfidf(rnewsflow_dfm)
el = compare_documents(dtm, date_var='date', hour_window = c(0.1, 36))

g = as_document_network(el)
g

kasperwelbers/RNewsflow documentation built on April 8, 2024, 4:39 p.m.