psa: Analyze the results of a particle size test

View source: R/psa.R

psaR Documentation

Analyze the results of a particle size test

Description

Accepts a variety of laboratory protocols, see psa_protocols()

Usage

psa(
  dir,
  bouyoucos_cylinder_dims = NULL,
  tin_tares = NULL,
  beaker_tares = NULL,
  hydrometer_dims = NULL,
  ...
)

Arguments

dir

Folder containing the pertinent files

bouyoucos_cylinder_dims

dimensions of sedimentation cylinders

tin_tares

data frame of tin tares used for water content determination

beaker_tares

data frame of beaker tares used for pipette methods

hydrometer_dims

data frame of hydrometer dimensions

...

other arguments passed for individual protocols. These identify sets of lab equipment used to perform calculations. See details.

Details

This function relies on the dimensions of lab equipment used during the tests. It is recommended to set these as global options at the top of your script or in an .Rprofile file, but they can also be passed as individual named arguments. See the vignette on setting lab equipment to work with soiltestr. (link needed). Choices include the following (tests which require each type of equipment are in parentheses):

  • bouyoucos_cylinder_dims (hydrometer)

  • tin_tares (all tests)

  • psa_beaker_tares (pipette)

  • (need to finish this list before publishing on CRAN)....

Value

List of length 6 containing:

  1. Data frame of cumulative percent passing data (tidy/long format)

  2. Data frame with breakdown into traditional SSSA size classes (wide format)

  3. Data frame with breakdown into size sub classes, if measured (wide format); if not possible due to limited number of particle diameters, this element is NULL; various breakdowns are available based on the chosen protocol (see psa_protocols())

  4. List of ggplot objects (one per specimen)

  5. Metadata about the test protocol

  6. If pre-treatment was performed, the loss on pre-treatment for each specimen; otherwise NULL


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