icpsr_download provides a programmatic and reproducible means to download datasets from the Inter-university Consortium for Political and Social Research

icpsr_download(
file_id,
email = getOption("icpsr_email"),
reset = FALSE,
msg = TRUE,
unzip = TRUE,
delete_zip = unzip
)

## Details

icpsr_download provides a programmatic and reproducible means to download datasets from the Inter-university Consortium for Political and Social Research, which requires a user account. Sign up for an account at https://www.icpsr.umich.edu before proceeding.

To avoid requiring others to edit your scripts to insert their own email and password or to force them to do so interactively, the default is set to fetch this information from the user's .Rprofile. Before running icpsr_download, then, you should be sure to add these options to your .Rprofile substituting your info for the example below:

 options("icpsr_email" = "[email protected]", "icpsr_password" = "password123!") 

If this information is not found a user's .Rprofile, the function will also check in the .Renviron file. Either file may be easily edited via usethis::edit_r_profile() or usethis::edit_r_environ().

## Examples

if (FALSE) {
}