check_files: Check file structure

View source: R/utils-file.R

check_filesR Documentation

Check file structure

Description

Check file structure before running the age model.

Usage

check_files(wdir, entity = NULL, am = "bacon")

Arguments

wdir

Working directory, absolute or relative path.

entity

Entity name.

am

Age model name.

Details

If only wdir is passed, the value of entity will be extracted from the last portion of wdir. For example, if wdir = "/path/to/a", then entity = "a" and wdir = "/path/to". If entity = NULL and wdir = "/" the function will return an error message, because the path is too short. To use the current working directory, wdir = "./".

Value

Stop the execution if the file structure does not match the expected for the age model.

Examples

## Not run: 
    ageR:::check_files("/", "test")

## End(Not run)


special-uor/ageR documentation built on July 10, 2024, 10:08 p.m.