cfr_text | R Documentation |
cfr_text
returns a tibble of CFR text
cfr_text(
year,
title_number,
chapter,
part,
token = "words",
return_tidytext = TRUE,
verbose = FALSE,
...
)
year |
numeric between 1996 and current year-1. |
title_number |
numeric between 1 and 50. |
chapter |
numeric or roman numeral. |
part |
numeric. |
token |
character. Unit for tokenizing. Currently |
return_tidytext |
logical. TRUE = tidytext, FALSE = raw data |
verbose |
logical. Will return "helpful" messages regarding the status of the URL. |
... |
Extra arguments passed on to tokenizers, such as n and k for "ngrams" and "skip_ngrams" |
cfr_text
This function is the main function of the fedregs
package. It takes the title, chapter, part, and year and returns a tibble of raw text (return_tidytext = FALSE
) or tidytext text (return_tidytext = TRUE
). N.b., it has not been extensively tested on titles and chapters other than Title 50 chapter VI and part 648.
a tibble with year, title_number, chapter, part, and text nested by subpart
regs <- cfr_text(year = 2018,
title_number = 50,
chapter = 6,
part = 648,
return_tidytext = TRUE,
token = "words",
verbose = TRUE)
head(regs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.