as_data_file: Return the data file name corresponding to the given...

View source: R/scmake.R

as_data_fileR Documentation

Return the data file name corresponding to the given indicator name

Description

If ind_file does not have the indicator extension, an error will be generated.

Usage

as_data_file(ind_file, ind_ext = getOption("scipiper.ind_ext"))

Arguments

ind_file

the indicator name (with path as needed) whose corresponding data file name should be returned

ind_ext

the indicator file extension to expect at the end of ind_file

Examples

as_data_file('mydata.rds.ind') # 'mydata.rds'
as_data_file('mydata.rds.st', ind_ext='st') # 'mydata.rds'
## Not run: 
as_data_file('mydata.rds') # Error: "ind_file is not an indicator file"

## End(Not run)

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