Accepts the draft truncation file written by smru_suggest_trim() as it is: copies <cid>_trimIDs_draft.csv to <cid>_trimIDs.csv and sets "trimIDs" in the config file to that file. With set_download_false = TRUE it also sets "download" to false, so the delayed-mode QC uses the local .mdb files that the suggestions were made from. Use it after reviewing the review PDF, when every suggestion is accepted unchanged. To change any suggestion, edit the draft and save it as <cid>_trimIDs.csv instead.

The config file is edited as text: only the "trimIDs" value (or a new "trimIDs" line after "dropIDs") and, optionally, the "download" value change, so its layout is kept. The edited file is checked to parse, with the new values, before anything is written.

The function runs only for delayed-mode QC (QCmode = "dm").

accept_trim_dates(
  wd,
  config,
  draft_file = NULL,
  trim_file = NULL,
  set_download_false = FALSE,
  overwrite = FALSE
)

Arguments

wd

the working directory, as in smru_qc()

config

the JSON config file, as in smru_qc()

draft_file

the draft truncation file. Default: <cid>_trimIDs_draft.csv in wd

trim_file

the accepted truncation file to write. Default: <cid>_trimIDs.csv in wd

set_download_false

logical; set "download" to false in the config file (default FALSE)

overwrite

logical; replace an existing trim_file (default FALSE, so a hand-edited file is not lost)

Value

invisibly, the path of the accepted truncation file