save_raw_data.Rd
This function retrieves a YRBS dataset by year, creates a directory if needed, and saves it in the specified format.
save_raw_data(
year,
format = "csv",
dest_dir = "downloaded_raw_data",
load = TRUE,
...
)
Numeric. The year of YRBS data to retrieve (e.g., 2017).
Character. The format to save the data: "csv", "spss", "parquet", or "rds".
Character. Destination directory to store the file (default: "downloaded_raw_data").
Logical. Whether to load the dataset into R (TRUE) or just save it (FALSE).
Additional arguments passed to the respective saving functions.
If load = TRUE
, returns the dataset. Otherwise, returns the file path invisibly.