Skip to contents

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

Usage

flux_flag_count(
  slopes_df,
  f_flags = c("ok", "discard", "zero", "weird_flux", "start_error", "no_data",
    "force_ok"),
  fluxid_col = "f_fluxID",
  flags_col = "f_quality_flag",
  cut_col = "f_cut",
  cut_arg = "cut"
)

Arguments

slopes_df

dataframe of flux slopes

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).

fluxid_col

column containing fluxes unique ID

flags_col

column containing the quality flags

cut_col

column indicating which part of the flux is being cut

cut_arg

argument defining that the data point should be cut out

Value

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

Author

Vincent Belde

Examples

data(slopes30qua_flag)
flux_flag_count(slopes30qua_flag)
#> # A tibble: 7 × 3
#>   f_quality_flag     n ratio
#>   <fct>          <int> <dbl>
#> 1 ok                 6     1
#> 2 discard            0     0
#> 3 zero               0     0
#> 4 weird_flux         0     0
#> 5 start_error        0     0
#> 6 no_data            0     0
#> 7 force_ok           0     0