dta_get_datasets()
copies a dataset from the code
installation
to a specified file path. If no path is provided, it saves the file as
dta-data.xlsx
in the current working directory.
Value
The function does not return a value. It prints a success message if the operation is successful or throws an error if it fails.
Details
The function uses file.copy()
to copy the file specified by
dta_path()
to the destination path. The destination path can be
provided as an argument, or it defaults to dta-data.xlsx
in the
current working directory.