bc_stocks: bc_stock()

View source: R/bc_stocks.R

bc_stocksR Documentation

bc_stock()

Description

Estimate the stock of an element contained given its concentration along a sediment core.

Usage

bc_stocks(
  sample_data,
  core_id,
  sample_depth,
  element_concentration,
  maximum_depth,
  method = NULL,
  section_height = NULL,
  diagnostic_plot = FALSE
)

Arguments

sample_data

Sediment sample properties, after calculating elemental concentration and correcting compaction

core_id

Name of for core the identifier. Should be a string

sample_depth

Name of variable for the depth at which samples were taken

element_concentration

Name of the variable for the concentration of the element whose stock is being estimated

maximum_depth

Depth to which to estimate the stock.

method

Method used to estimate the stock, one of "rectangle" or "trapezoid"

diagnostic_plot

Should a plot of how the stock was estimated be shown? FALSE (default) or TRUE

section_start

(Optional, only for "rectangle" method) Depth at which the core section represented by each sample begins

section_end

(Optional, only for "rectangle" method) Depth at which the core section represented by each sample ends

Details

Calculate elemental stocks:

  1. Trapezoid rule (Martins, M. et al 2021)

  2. Rectangle rule (Howard, J. et al 2014)

  • User provides start and end of sections represented by samples

  • Heights of sections are automatically estimated 3.(optional) - Plots how the stock is being estimated, with a special draw towards any sections that have to be extrapolated


costavale/BlueCarbon documentation built on May 7, 2023, 2:18 a.m.