Checking for file path before import in R.

file_path_checking(file_path, extension, output = "error")

Arguments

file_path

Object of class character expected. File location on your system.

extension

Object of class vector of character expected. Expected extension type set (avoid the . before the extension).

output

character expected. Kind of expected output. By default "error". You can choose between "error", "message" or "logical".

Value

The function returns error with output is "error" and if the parameters are not respected, a character with output is "message", a logical with output is "logical"