psa_datasheets: Populate empty data sheets

View source: R/psa_datasheets.R

psa_datasheetsR Documentation

Populate empty data sheets

Description

Generates several empty .csv files with the correct column names and structure. Use for pipette method of particle size analysis.

Usage

psa_datasheets(
  dir,
  date,
  protocol_ID,
  experiment_name,
  sample_names,
  n_reps = 1,
  tin_tare_set = "",
  beaker_tare_set = NULL,
  pipette_beaker_numbers = NULL,
  bouyoucos_cylinder_numbers = NULL,
  blank_correction_bouyoucos_cylinder = NULL,
  hydrometer_ID = NULL,
  Gs = NULL,
  calgon_solution_ID = NULL,
  ...
)

Arguments

dir

Character. Directory to write the empty data files.

date

Character. Date test was begun by weighing air-dry specimens, ISO YYYY-MM-DD format

protocol_ID

Character (integers will be coerced), length 1. Unique identifier for the method employed; see psa_protocols

experiment_name

Character, length 1. Experiment with which the samples are associated.

sample_names

Character. Unique identifiers for the samples tested (for example, "EPK kaolin").

n_reps

Integer, length 1. Number of replicate specimens tested per sample

tin_tare_set

Character, length 1. Set of tin masses for water content determination.

beaker_tare_set

Character, length 1. Set of beaker masses for pipetting

pipette_beaker_numbers

Integer (optional). Vector of the beakers used for pipette weighing.

bouyoucos_cylinder_numbers

Integer (optional). Vector of the test cylinders used for pipette weighing. Important for hydrometer analysis due to width correction.

blank_correction_bouyoucos_cylinder

Integer (optional). Cylinder number used for the blank correction; not so important for pipette analysis but needed for hydrometer to reference cross-sectional area which is needed for calculation of effective depth

hydrometer_ID

Integer of length 1 identifying which hydrometer is used for the test. The ID is used to link to a data object in the asi468 packgae which contains information about the hydrometer's dimensions. Ignored by protocols not using hydrometer analysis.

Gs

Double vector of matching length to sample_names. Specific gravity of soil solids (assumed or measured). If no value entered, defaults to 2.70.

...

Currently unused, reserved for expansion (potentially to pass other arguments to internal functions pipette_sampling_datasheets(), hydrometer_sampling_datasheets(), or sieving_datasheets())

Details

Calls various internals based on protocol_ID argument to determine required structure of sheets.

The date refers to the date the first step of the test was begun. As most soil tests span multiple days, this convention avoids any ambiguity about when they were weighed, tested, etc.

Value

Files are written to disk and a message is printed.


evanmascitti/soiltestr documentation built on Oct. 6, 2022, 5:32 p.m.