file_checks: Check file existence / extension

Description Usage Arguments Details Value Author(s)

View source: R/file_checks.R

Description

Checks whether a file exists and returns a message that depends on whether that file was supposed to exist. It can also check whether the file has a given extension, and return a message based on that too.

Usage

1
file_checks(filename, shouldExist = TRUE, extension = NA, verbose = FALSE)

Arguments

filename

String - file to check

shouldExist

Logical - whether you expect the file to exist; default TRUE

extension

String - extension the file should have; default NA

verbose

Logical - whether to print progress / results

Details

Checks whether specified file exists and returns TRUE if the file exists and was supposed to or doesn't and wasn't supposed to, and FALSE otherwise. Will also return FALSE if given an extension and the file doesn't have it.

Value

Logical - whether file checks out

Author(s)

Emma Myers


e-myers/rnaseq documentation built on May 20, 2019, 9:14 p.m.