calculate_ghg_flux {aelab}R Documentation

calculate_ghg_flux

Description

Calculate the greenhouse gas (GHG) flux based on input parameters from a data frame.

Usage

calculate_ghg_flux(
  data,
  slope = "slope",
  area = "area",
  volume = "volume",
  temp = "temp"
)

Arguments

data

A data frame containing relevant data with columns for slope, area, volume, and temperature.

slope

Name of the column in 'data' that contains the slope values of the GHG concentration change (in ppm/s).

area

Name of the column in 'data' that contains the values of the area of the chamber (in square meter).

volume

Name of the column in 'data' that contains values of the volume of the chamber (in litre).

temp

Name of the column in 'data' that contains values of the temperature of the gas (in Celsius).

Value

A list containing the calculated flux and its unit.

Examples

data <- data.frame(
  slope = c(1.2, 1.5, 1.1),
  area = c(100, 150, 120),
  volume = c(10, 15, 12),
  temp = c(25, 30, 22)
)
results <- calculate_ghg_flux(data)
print(results)

[Package aelab version 1.0.1 Index]