nnNetwork: nnNetwork()

Description Usage Arguments

Description

A visualization function, which produces a network-style visualization from a properly formed Novel Networks data set. nnNetwork() chains

Usage

1
2
3
4
5
nnNetwork(filename, include.all = TRUE, set.voice = NA,
  local = FALSE, layout.with = "fr", plot.community = "spinglass",
  context = 15, multiplex = FALSE, token.threshold = 1,
  metadata.off = NA, sample = FALSE, vertex.label.thresh = 1,
  bg.col = "white")

Arguments

filename

<- "Frankenstein"

include.all

<- TRUE

set.voice

<- NA

local

<- TRUE

layout.with

Character. Sets layout algorithm. Accepts "fr" (Fruchterman-Reingold, default), "gem" (GEM force-directed), "kk" (Kamada-Kawai), "tree", "circle", "sphere", "lgl" (Large Graph).

plot.community

NA for no community detection, "spinglass" for simulated annealing, or "walktrap" for a random walk.

context

Counting number. How many words from each name should the function seek others? Default = 15.

multiplex

Logical vector of length one. Return a multiplex graph? Default = FALSE.

token.threshold

Numeric. Removes characters with token count < x from graph. Default = 1.

metadata.off

Default = NA. Expects a length-two vector of c("meta", "VALUE"), or matrix of vectors, to cull characters by metadata category. Useful for removing non-characters, generating subgraphs by gender, etc...

sample

Default = FALSE. A logical vector indicating whether the .txt should be randomized (i.e. words scrambled). Useful for checking whether modularity results are statistically meaningful.

vertex.label.thresh

Numeric (Default = 1). Only vertices >= this value will be labeled.

bg.col

Character. Sets background color for plot. Default = "white".

filename

Character string of text name, with associated Char.csv and .txt files.

include.all

Logical vector or numerical range. If TRUE (default), processes whole text. If range (i.e. 1:18), processes only those chapters. If FALSE, will offer a prompt to determine a range.

set.voice

NA, or character string. If NA, Char.csv pulls voice from associated *Char.csv file. If "third", will ignore first-person pronouns. If "first", will attempt to transform all non-dialogue "I" and "me" into narrator, signaled on Char.csv file as "TextEgo".

local

Logical vector. If FALSE (default), looks in Google Drive for files. If TRUE, looks for filename in a folder with path data/filename/.


seanrsilver/novnet documentation built on June 19, 2019, 12:44 a.m.