is_ind_file: Determine whether target_names are indicator files

View source: R/scmake.R

is_ind_fileR Documentation

Determine whether target_names are indicator files

Description

Indicator files are those files (or maybe someday objects?) included in the remake yml whose final extension is the accepted indicator extension ('ind' by default, but see ?scipiper::options). If the target does not have the indicator extension, FALSE is returned; no warnings or errors are given if the target is not in the remake yml.

Usage

is_ind_file(target_names, ind_ext = getOption("scipiper.ind_ext"))

Arguments

target_names

character vector of remake target names

ind_ext

the indicator file extension to recognize, i.e., the final file extension of files for which is_ind_file() should return TRUE

Details

By default, the only accepted indicator extension is 'ind'. If you want other extensions to be used, add a object target to your remake.yml that contains a character vector of the accepted extensions. See below for an example.

Examples

is_ind_file('mydata.rds') # FALSE
is_ind_file('mydata.rds.ind') # TRUE
is_ind_file('mydata.rds.st', ind_ext='st') # TRUE
is_ind_file('mydata.rds', ind_ext='rds') # TRUE but you shouldn't do this

USGS-R/scipiper documentation built on May 25, 2023, 8:47 a.m.