Directly download and save IPEDS zip files to disk for future usage. By default, the function will create subdirectories as necessary in which to save the files.
Usage
ipeds_download_to_disk(
  to_dir,
  files = NULL,
  use_ipeds_dict = NULL,
  type = c("data", "dictionary"),
  overwrite = FALSE,
  create_dir = TRUE,
  quiet = FALSE
)Arguments
- to_dir
- Directory path for saving zip files (will be created if it does not exist unless - create_diris set to- FALSE).
- files
- Vector of survey file names without ending to download (e.g., HD2023). 
- use_ipeds_dict
- Output from - ipeds_dict()in which- return_dict = TRUE; if argument isn't missing, it will be chosen over input to files argument if also included.
- type
- Download the data file (default) or associated dictionary file. 
- overwrite
- Overwrite files on local directory with those in temporary directory. Default is - FALSE(keep already existing files).
- create_dir
- Recursively create directory path specified by user if it does not exist. Default is - TRUE.
- quiet
- Do not show progress messages. Default is - FALSE.
Examples
if (FALSE) { # \dontrun{
ipeds_download_to_disk(".", c("HD2020", "HD2021"))
ipeds_download_to_disk(".", c("HD2020", "HD2021"), overwrite = TRUE)
files <- c("HD2020", "HD2021")
ipeds_download_to_disk(".", files)
# using return from ipeds_file_table() to download all 2020 files
dict <- ipeds_file_table()
ipeds_download_to_disk(".", use_ipeds_dict = dict[dict$year == 2020,])
# download associated dictionary files
ipeds_download_to_disk(".", c("HD2020", "HD2021"), type = "dictionary")
} # }