inventory_add: Keep track of important items from previous analyses.

Description Usage Arguments Details

View source: R/inventory.R

Description

Keep track of important items from previous analyses.

Usage

1
2
3
4
5
6
7
8
inventory_add(
  tag = NULL,
  inv_location = NULL,
  filename = NULL,
  extra = "",
  parent_tag = "",
  force = TRUE
)

Arguments

tag

identifier for an inventory record that you want to add.

inv_location

Path to the inventory you want to create or modify. If possible, this arg defaults to the parent of the last destination given to 'freeze'.

filename

relative path from inv_location for a file that you want to add to the inventory.

extra

Any character string without tabs. Meant for metadata to be associated with the given tag and filename. This may just be notes, or you could include an underscore- and pipe-delimited list of key-value pairs; the sky's the limit.

parent_tag

identifier for a file that this analysis depends on.

force

Bump any existing entry with the given tag, moving it to a backup with a similar name. Default is TRUE.

Details

inventory_* functions help track data as it passes through multiple stages of analysis. The central data structure is a table with the filename .inventory.txt. It has five columns: tag, parent_tag, date_modified, filename, and extra.

inventory_add looks for this table at the inv_location you specify. inventory_add will add a row with the given tag. If that tag is present already and force==TRUE, the record will be altered. If the tag is present but force==FALSE, the tag will be altered via make.unique and a new record will be created.


ekernf01/freezr documentation built on Feb. 8, 2022, 5:22 a.m.