sotu_dir: Save State of the Union Addresses in Directory

View source: R/funs.R

sotu_dirR Documentation

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())

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.

Value

a character vector with complete paths to the texts

Author(s)

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

Examples


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


sotu documentation built on Aug. 17, 2022, 5:06 p.m.