use_diary {campfin} | R Documentation |
Create a new template data diary
Description
Take the arguments supplied and put them into the appropriate places in a new template diary. Write the new template diary in the supplied directory.
Usage
use_diary(
st,
type,
author,
path = "state/{st}/{type}/docs/{st}_{type}_diary.Rmd",
auto = FALSE
)
Arguments
st |
The USPS state abbreviation. State data only, no federal agencies. |
type |
The type of data, one of "contribs", "expends", "lobby", "contracts", "salary", or "voters". |
author |
The author name of the new diary. |
path |
The file path, relative to your working directory, where the
diary file will be created. If you use |
auto |
Must be set to |
Value
The file path of new diary, invisibly.
Examples
use_diary("VT", "contribs", "Kiernan Nicholls", NA, auto = FALSE)
use_diary("DC", "expends", "Kiernan Nicholls", tempfile(), auto = FALSE)