prepare_labdat: Prepare lab data

View source: R/prepare_labdat.R

prepare_labdatR Documentation

Prepare lab data

Description

Prepare lab data for incorporation into database. Extract the data that is not yet in the database, format it, and insert into the database file.

Usage

prepare_labdat(
  path_to_labdat_file,
  path_to_db_file,
  path_to_db_dates_file,
  path_to_parameters,
  file_sheet_year
)

Arguments

path_to_labdat_file

string. Full path (from root directory) to the lab data file to be inserted into the database file

path_to_db_file

string. Full path (from root directory) to the .csv database file if it exists, and desired path to a .csv database file if it does not exist

path_to_db_dates_file

string. Full path (from root directory) to the .csv database dates file if it exists, and desired path to a .csv database dates file if it does not exist

path_to_parameters

string. Full path (from root directory) to the .xlsx file that contains the desired parameters and associated info (station, units, corrected units...)

file_sheet_year

numeric. The year of the labdata file of interest

Value

list of length 3.

  1. boolean. Are the provided database files empty or not?

  2. dataframe containing the processed lab data (not dates)

  3. dataframe containing the processed lab data (dates) into the database file


biogeochem/bpwtpR documentation built on May 6, 2024, 5:17 p.m.