inventory_save_and_add: Wrapper for inventory_add that also saves tables and R...

Description Usage Arguments

View source: R/inventory.R

Description

Wrapper for inventory_add that also saves tables and R objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
inventory_save_and_add(
  object,
  tag = deparse(substitute(object)),
  file_type = if (is.data.frame(object)) {     "csv" } else {     "Rdata" },
  save_method = if (is.data.frame(object)) {     write.csv } else {     saveRDS },
  filename = file.path(Sys.getenv("FREEZR_DESTINATION"), paste0(tag, ".", file_type)),
  extra,
  inv_location = NULL,
  verbose = T,
  ...
)

Arguments

object

object gets saved by function save_method with extension file_type.

tag

identifier for an inventory record that you want to add.

filename

Path for the file that you want to save. Absolute or relative to inv_location.

extra

Any character string without tabs. Meant for notes to describe the saved data.

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'.

force

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


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