egoNetwork-partition-method: Prepare data for an ego-network

egoNetwork,partition-methodR Documentation

Prepare data for an ego-network

Description

For a node word, cooccurrences of n degrees are calculated

Usage

## S4 method for signature 'partition'
egoNetwork(
  object,
  node,
  degrees,
  pAttribute = "useControls",
  left = 0,
  right = 0,
  minSignificance,
  posFilter = c()
)

Arguments

object

a partition object

node

query, which may by a multi-word unit

degrees

the degrees of the resulting egoNetwork

pAttribute

p-attribute of the query

left

no of tokens and to the left of the node word

right

no of tokens to the right of the node word

minSignificance

minimum log-likelihood value

posFilter

character vector with the POS tags to be included - may not be empty!!

Details

The function returns a data frame that can be converted into an igraph object easily. This conversion is not part of the function to keep number of dependencies of the package low.

Value

a data frame that can be turned into an igraph object with graph.data.frame (see example)

Author(s)

Andreas Blaette

Examples

## Not run: 
 nw <- partition(list(text_year="2005", text_type="speech"), corpus="PLPRNWHTM")
 net <- egoNetwork(nw, "Integration", 1, "word", 5,5, 3.84, "NN")
 g <- graph.data.frame(net[,c(1,2,3,7)])
 tklplot(g)
 
## End(Not run)

PolMine/polmineR.misc documentation built on Nov. 23, 2022, 9:01 p.m.