initDir: Initialize directory

View source: R/initDir.R

initDirR Documentation

Initialize directory

Description

Checks and creates a directory recursively automatically.

Usage

initDir(dir)

Arguments

dir

character(1). Directory path.

Details

Useful for setting up functions that require writes to a user-specified directory.

Value

character(1). Directory path.

Note

Updated 2022-06-02.

Examples

dir <- file.path(tempdir(), "testdir")
dir.exists(dir)
dir <- initDir(dir)
dir.exists(dir)
print(dir)
unlink2(dir)

acidgenomics/AcidBase documentation built on Sept. 14, 2022, 2:59 a.m.