is_file: Checks whether the variable is a path to an existing file

Description Usage Arguments Value Examples

View source: R/predicates.R

Description

Checks whether the variable is a path to an existing file

Usage

1

Arguments

x

(any) The object to test

Value

TRUE if x is a path to an existing file, FALSE otherwise

Examples

1
2
3
4
5
6
7
tmpfile <- tempfile()
file.create(tmpfile)

is_file(tmpfile)

is_file("/does/not/exist.txt")
is_file(1)

msgr documentation built on Dec. 16, 2019, 5:41 p.m.