Skip to contents

Checks if the desired directory exists. If not, the desired directory is created.

Usage

check_directory(dir_name, recursive = TRUE, no_warning = FALSE)

Arguments

dir_name

Path to the desired directory, as a string.

recursive

Should elements of the path other than the last be created? If TRUE, behaves like the Unix command mkdir -p.

no_warning

Whether to cancel the warning issued if a directory is created (bool).

Examples

if (FALSE) check_directory("./results/my_new_folder")