manage_local_EC_archive: manage_local_EC_archive

View source: R/utility_functions.R

manage_local_EC_archiveR Documentation

manage_local_EC_archive

Description

Utility function to help retrieve new EC data and/or prune duplicates, as NEON provisions new data or re-provisions data for an existing site and month.

Usage

manage_local_EC_archive(
  file_dir,
  get = TRUE,
  unzip_files = TRUE,
  trim = FALSE,
  dry_run = TRUE,
  sites = "all"
)

Arguments

file_dir

Specify the root directory where the local EC store is kept.

get

Pull down data from NEON API that does not exist locally?

unzip_files

NEON gzips the hdf5 files, should we unzip any gzipped files within file_dir? (Searches recursively)

trim

Search through local holdings, and remove older file where there are duplicates?

dry_run

List files identified as duplicates, but do not actually delete them? Default true to prevent unintended data loss.

sites

Which sites to retrieve data from? Default will be all sites with available data, but can specify a single site or a vector here.

Value

Returns nothing to the environment, but will download new NEON HDF5 files for selected sites (if get = TRUE), unzip them in the local file directory (if unzip_files = TRUE), and identify and remove suspected duplicate files (if trim = TRUE and dry_run = FALSE).

Author(s)

Rich Fiorella rfiorella@lanl.gov


NEONiso documentation built on Sept. 23, 2022, 1:06 a.m.