Txt_to_df: Txt_to_df()

Description Usage Arguments

Description

Along with charDf_to_edgelist(), this is one of the central utilities of the NovNet package. a) scans in the .txt file of a novel, and transforms it into a vector b) scans in a *Char.csv spreadsheet of character name alternates c) locates all the alternate names in the .txt vector, and d) replaces them with uniqnames. e) it returns as output a list of objects tailored for network analysis

Usage

1
2
Txt_to_df(filename, include.all = TRUE, set.voice = NA,
  chunk.length = 5000, local = FALSE)

Arguments

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".

chunk.length

Numeric. Default = 5000. Only used if text contains no chapters.

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.