sc_indicate: Create an indicator file

View source: R/scmake.R

sc_indicateR Documentation

Create an indicator file

Description

If only the first argument (ind_file) is given, the contents of the indicator file change every time. To create an indicator file whose contents are static, specify a fixed argument in ....

Usage

sc_indicate(
  ind_file,
  ...,
  data_file,
  hash_depends = FALSE,
  depends_target,
  depends_makefile
)

Arguments

ind_file

file name of the indicator file to write

...

optional. named character strings/vectors to be written to the indicator file. one good option is a pre-computed hash of the actual data file (possibly retrieved as a hash from the remote cache). If you have the data_file locally and don't yet have a hash, just specify the data_file argument instead.

data_file

optional. file name(s) of the data file(s) whose presence is being indicated. if length one, the hash of the data file will be included in the indicator file as the hash element. if given as a multi-file vector, the file names and hash elements will be paired in the output.

hash_depends

logical. If TRUE, this call will look through depends_makefile for a recipe for depends_target, will generate a hash of each file or object listed in the depends section for that recipe, and will report those named hashes in ind_file. This pattern is useful for generating indicator files that sum up the output of a target that groups together many other targets in its depends section.

depends_target

character name of a target in the remake .yml file specified in depends_makefile. This target must have at least one item in its depends section. Used only when hash_depends=TRUE.

depends_makefile

character name of the remake file that contains a recipe for depends_target. Used only when hash_depends=TRUE.


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