add_text: Obtain Text from Download Links and Add to Data Frame

View source: R/get-text.R

add_textR Documentation

Obtain Text from Download Links and Add to Data Frame

Description

Obtain Text from Download Links and Add to Data Frame

Usage

add_text(df, all = FALSE)

Arguments

df

data frame produced by get_all_comments or get_all_documents

all

logical; TRUE if you want to include all attachments for each comment, FALSE if you want to include only one. The default value is FALSE. If you choose TRUE, note that the attachments may include duplicated text, so this should be considered for further analysis.

Value

data frame with all columns of df as well as an additional column text that contains the text from the attachment in the download link for that commend ID (if present).

Examples

## Not run: 
result <- get_all_documents(documentId = c(
  "FDA-2012-S-1144-0322",
  "NHTSA-2008-0060-0827", "DOT-OST-2018-0206-0008", "CMS-2018-0104-0001"
))
resul <- add_text(result)

## End(Not run)

q-w-a/regulationsgov documentation built on May 3, 2022, 8:23 p.m.