data_archive: Move data to archive for a state (equal-to or before a...

Description Usage Arguments See Also

View source: R/data.R

Description

Probably most useful for moving in batches (e.g., looping across states). Othewise it can be done easily by hand. By default, moves relevant raw data files to the H drive.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data_archive(
  state,
  period,
  current_drive = file.path("E:/SA/Data-sensitive/Data-Dashboards", state),
  archive_drive = file.path("H:/SA/Data-sensitive/Data-Dashboards", state),
  pattern = "raw-2...-q.",
  move_folders = TRUE,
  move_files = FALSE,
  delete_after_copy = TRUE
)

Arguments

state

character: Two letter state designation

period

character: Time period for the first project (e.g., "2019-q4", "2020-q4", etc.)

current_drive

drive from which to move

archive_drive

destination drive

pattern

matching pattern sent to list.files

move_folders

If TRUE, will move files within folders matching the pattern

move_files

If TRUE, will move files matching the pattern (e.g., sqlite)

delete_after_copy

If TRUE, the current_drive files will be deleted after copying (i.e., archived), otherwise not (i.e., backed-up)

See Also

Other functions to manage data: data_backup(), data_destroy()


southwick-associates/lictemplate documentation built on Jan. 10, 2022, 6:44 p.m.