This function retrieves a specified YRBS dataset from the package, creates a "data" directory in the working directory (if it does not exist), and saves the dataset as a CSV file.

save_data_to_csv(dataset_name)

Arguments

dataset_name

Character. The name of the YRBS dataset to retrieve (e.g., "yrbs_2017"). Must match the dataset name as stored in the package.

Value

Returns the file path of the saved CSV invisibly. The dataset is saved in the "data" directory within the current working directory.

Examples

if (FALSE) { # \dontrun{
save_data_to_csv("yrbs_2017")
} # }