A visualization function, which produces a network-style visualization from a properly formed Novel Networks data set. nnNetwork() chains
1 2 3 4 5 |
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/. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.