Learn R Programming

sotu (version 1.0.4)

sotu_dir: Save State of the Union Addresses in Directory

Description

This function saves the State of the Union Addresses to disk, with one address in each file. Useful for testing and demonstrating text analysis functions that read from files.

Usage

sotu_dir(dir = tempfile())

Value

a character vector with complete paths to the texts

Arguments

dir

an optional directory of where the files should be saved. Otherwise, a temporary location is used. Will be created if it does not exist. Note that these temporary files are erased (eventually) after exiting R.

Author

Taylor B. Arnold, taylor.arnold@acm.org

Examples

Run this code

fp <- sotu_dir()
txt <- readLines(fp[200])
txt

Run the code above in your browser using DataLab