Learn R Programming

BlueCarbon (version 0.1.1)

estimate_compaction: Estimate Core Compaction

Description

Estimates the percentage of core compaction using measurements from a data.frame containing core properties. It computes a correction factor based on sampler tube length, internal distance, and external distance, and adds a 'compaction' column to the input data.frame with the calculated compaction rate as a percentage.

Usage

estimate_compaction(
  df = NULL,
  core = "core",
  sampler_length = "sampler_length",
  internal_distance = "internal_distance",
  external_distance = "external_distance"
)

Value

Returns the input data.frame with an additional 'compaction' column indicating the estimated percentage of core compaction.

Arguments

df

A data.frame containing core properties.

core

Character Name of the column identifying each core.

sampler_length

Character Name of the column with the total length of the sampler tube.

internal_distance

Character Name of the column with the distance between sampler top and core surface.

external_distance

Character Name of the column with the distance between sampler top and sediment surface.

Examples

Run this code
df <- estimate_compaction(
  core_comp,
  core = "core",
  sampler_length = "sampler_length",
  internal_distance = "internal_distance",
  external_distance = "external_distance"
)
head(df)


Run the code above in your browser using DataLab