create_edge: 'create_edge' returns an edge for a pair of words in a book...

Description Usage Arguments Value Examples

Description

create_edge returns an edge for a pair of words in a book graph.

Usage

1
create_edge(pair, node_labels)

Arguments

pair

A character vector of length 2.

node_labels

A character vector of generic length, containing all unique tokens extracted from a text.

Value

A list of integer vectors of length 2 each, containing the positions of the pair in the token vector.

Examples

1
2
create_edge(c("three", "men"), c("three", "men", "are", "waiting"))
create_edge(c("three", "are"), c("three", "men", "are", "waiting"))

andreabduque/gmining documentation built on May 12, 2019, 3:32 a.m.