select_unigrams: Subset unigrams from node names

Description Usage Arguments Value Examples

View source: R/term_selection.R

Description

Selects only nodes from a graph whose node names are single words.

Usage

1
select_unigrams(graph, imp_method = "strength")

Arguments

graph

an igraph object

imp_method

a character specifying the importance measurement to be used; takes arguments of "strength", "eigencentrality", "alpha", "betweenness", "hub" or "power"

Value

a data frame of node names, strengths, and rank

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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")
)

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

select_ngrams(my_network, imp_method = "strength")
select_unigrams(my_network, imp_method = "strength")

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