Script | R Documentation |
R6 class for storing information about a script and methods for analysing the text
returns an R6 object of class Script
path
The file path to the script
name
The title of the script/play
raw_text
The raw, unaltered text extracted from the file
text_df
The raw text, formatted as a dataframe with one row per line
search_results
A subset of text_df, filtered using the $search() method
new()
Initialise a new Script object
Script$new(path, title)
path
The file path to the script
title
(optional) the title of the script
an R6 object with class Script
print()
Print info about script
Script$print()
search()
Search for a string and return lines that match the string
Script$search(string)
string
the string to search for
a subset of the text_df dataframe with matching lines
clone()
The objects of this class are cloneable with this method.
Script$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.