ltMergeFiles: Merge a batch of Lotek .DTA files with an existing database.

Description Usage Arguments Details Value Note Author(s)

View source: R/ltMergeFiles.R

Description

Merge a batch of Lotek .DTA files with an existing database.

Usage

1
ltMergeFiles(files, j, dbdir = MOTUS_PATH$RECV)

Arguments

files

either a character vector of full paths to files, or the full path to a directory, which will be searched recursively for .DTA files.

j

job, whose ID will be recorded for any new / changed DTAfile record

dbdir

path to folder with existing receiver databases; defaults to MOTUS_PATH$RECV

Details

Any files which are not identical to an existing file are saved in the file repository at MOTUS_PATH$FILE_REPO. The names will be modified if necessary to avoid collisions with existing files.

Remaining files are deleted.

Value

a data_frame reporting the fate of each file, with these columns:

  1. fullname - full path to filename

  2. nameNew - TRUE iff file of this name was not yet in database

  3. dataNew - TRUE iff file with these contents was not yet in database

  4. use - TRUE iff file copied to database

  5. err - if not NA, any error message generated by trying to parse the file

  6. serno - serial number (e.g. "Lotek-1234") of receiver this file is from

  7. ts - first timestamp from a detection in this file

  8. tsLast - last timestamp from a detection in this file

  9. inRepo - file came from file_repo (rather than being a new upload; happens when fully reprocessing)

  10. fid - fileID, if file in or added to DB

Note

If err is not NA for a file, then other fields for that file might not be set appropriately in the return value.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


jbrzusto/motusServer documentation built on May 19, 2019, 8:19 a.m.