is_ind_file: Determine whether target_names are indicator files

Description Usage Arguments Details Examples

View source: R/scmake.R

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

1
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

1
2
3
4
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

aappling-usgs/scipiper documentation built on Aug. 1, 2020, 3:11 p.m.