flux_flag_count: Counts quality flags

View source: R/flux_flag_count.R

flux_flag_countR Documentation

Counts quality flags

Description

Provides a table of how many fluxes were attributed which quality flag. This function is incorporated in flux_quality as a message, but can be used alone to extract a dataframe with the flag count.

Usage

flux_flag_count(
  flags_df,
  f_fluxid = f_fluxid,
  f_quality_flag = f_quality_flag,
  f_flags = c("ok", "discard", "zero", "force_discard", "start_error", "no_data",
    "force_ok", "force_zero", "force_lm", "no_slope")
)

Arguments

flags_df

dataframe of flux slopes

f_fluxid

column containing fluxes unique ID

f_quality_flag

column containing the quality flags

f_flags

list of flags used in the dataset (if different from default from flux_quality). If not provided, it will list only the flags that are present in the dataset (no showing 0).

Value

a dataframe with the number of fluxes for each quality flags and their proportion to the total

Author(s)

Vincent Belde

Examples

data(co2_conc)
slopes <- flux_fitting(co2_conc, conc, datetime, fit_type = "exp_zhao18")
slopes_flag <- flux_quality(slopes, conc)
flux_flag_count(slopes_flag)

fluxible documentation built on June 25, 2025, 1:08 a.m.