Learn R Programming

campfin (version 1.0.9)

use_diary: 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, auto = FALSE)

Value

The file path of new diary, invisibly.

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.

auto

If TRUE, file is created in the correct working directory. If FALSE, a plain character string is returned. If a directory name, the file is automatically written to that directory.

Examples

Run this code
use_diary("VT", "contribs", "Kiernan Nicholls", FALSE)
use_diary("VT", "contribs", "Kiernan Nicholls", tempdir())

Run the code above in your browser using DataLab