check_vrls: Check VRL files

Description Usage Arguments Details Value Author(s)

View source: R/check_vrls.R

Description

This checks the serial number and date of VRL records against those present in the database.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
check_vrls(
  vrl_file_dir,
  db_filepath,
  date_range = c("2012-01-01", "2060-01-01"),
  con = dbConnect(SQLite(), db_filepath),
  vrl_files = list.files(vrl_file_dir, pattern = "\\.vrl$", recursive = TRUE,
    full.names = TRUE),
  serial_date_df = grab_serial_date(vrl_files),
  deploy_query = "SELECT Receiver, VRLDate FROM deployments"
)

Arguments

vrl_file_dir

the parent directory for the VRL files

db_filepath

the full file path to the database

date_range

a vector of two quoted dates in "YYYY-MM-DD" format

con

a connection to a SQL database

vrl_files

a character vector of the VRL files to check against

serial_date_df

a data.frame created by grab_serial_date

deploy_query

SQL query to grab the deployment records of interest

Details

This checks the serial number and date of VRL records against those present in the database.

Value

list, with two data.frame, the original serial_date_df with an additional logical column specifying if the VRL record was present in the database, and a data.frame of the detections, with an additional logical column indicating if the record in the database has an associated file in the folder.

Author(s)

Matt Espe


fishsciences/ybt documentation built on March 11, 2021, 8:45 a.m.