create_network: Create a keyword co-occurrence network

Description Usage Arguments Value Examples

View source: R/term_selection.R

Description

Creates a keyword co-occurrence network from an adjacency matrix trimmed to remove rare terms.

Usage

1
create_network(search_dfm, min_studies = 3, min_occ = 3)

Arguments

search_dfm

a document-feature matrix created with create_dfm()

min_studies

the minimum number of studies a term must occur in to be included

min_occ

the minimum total number of times a term must occur (counting repeats in the same document)

Value

an igraph weighted graph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
dfm <- create_dfm(
  elements = c(
    "Cross-scale occupancy dynamics of a postfire specialist
    in response to variation across a fire regime",
    "Variation in home-range size of Black-backed Woodpeckers",
    "Black-backed woodpecker occupancy in burned and beetle-killed forests"
  ),
  features = c("occupancy", "variation", "black-backed woodpecker", "burn")
)

create_network(
  search_dfm = as.matrix(dfm),
  min_studies = 1,
  min_occ = 1
)

elizagrames/litsearchr documentation built on April 14, 2021, 3:42 p.m.