Get a safe name to export a file without overwriting
Source:R/get_safe_file_name.R
get_safe_file_name.Rd
Get a safe name to export a file without overwriting
Usage
get_safe_file_name(
data,
name = NULL,
format = "xlsx",
overwrite = FALSE,
time_in_name = FALSE
)
Arguments
- data
The object to be exported.
- name
A desired name for the exported file. If no name is provided, the file will inherit the object's name.
- format
The format of the exported file. Default is 'xlsx'.
- overwrite
A logical to indicate whether preexisting files with identical names should be overwritten. Default is 'FALSE'.
- time_in_name
A logical to indicate whether a timestamp should be included in the file's name.
Examples
# \donttest{
if (FALSE) {
library(phdcocktail)
get_safe_file_name(mtcars)
}
# }