Determine whether an R file exists regardless of case of extension.

extensionless_exists(filename)

Arguments

filename

character. The filename to test (possibly without extension).

Value

TRUE or FALSE if the filename exists regardless of R extension.

Examples

not_run({ # Assume we have a file \code{"foo.R"}. The following all return \code{TRUE}. extensionless_exists('foo.R') extensionless_exists('foo.r') extensionless_exists('foo') })