insp_trim_tables: Trim Table Directory for Inspections Tables

insp_trim_tablesR Documentation

Trim Table Directory for Inspections Tables

Description

insp_trim_tables() ensures that at least min_tables tables are in the tables directory at a time, but that at most min_tables days worth of tables are kept if there are more than min_tables tables. All tables should be archived before removal. This function is for internal use in insp_archive_table() .

Usage

insp_trim_tables(
  table_dir = "V:/Compliance/Inspection Data for Publishing/Table/",
  table_pattern = "insp_table_.*html",
  min_tables = 1L
)

Arguments

table_dir

The directory containing the most recent inspections table(s)

table_pattern

The inspections table naming pattern, in regex. This prevents deletion of files which aren't inspection tables.

min_tables

The minimum number of tables to keep in table_dir

Value

table_dir (invisibly)

See Also

insp_archive_table() , trim_backups()


jesse-smith/covidReport documentation built on Aug. 3, 2024, 4:52 p.m.