Learn R Programming

REDCapTidieR (version 1.2.3)

check_file_exists: Check if file already exists

Description

Provide an error message when a file is declared for writing that already exists.

Usage

check_file_exists(file, overwrite, call = caller_env())

Value

An error message saying the requested file already exists

Arguments

file

The file that is being checked

overwrite

Whether the file was declared to be overwritten

call

The calling environment to use in the error message

Details

In the case of write_redcap_xlsx(), this should only error when a file already exists and is not declared for overwite.