qc_taxa_values_numeric: QC Autecological Numeric Values

View source: R/qc_taxa_values_numeric.R

qc_taxa_values_numericR Documentation

QC Autecological Numeric Values

Description

Performs basic QC of a numeric column showing all values.

Usage

qc_taxa_values_numeric(
  data,
  col_vals = NULL,
  valid_min = NULL,
  valid_max = NULL
)

Arguments

data

A data frame containing autecological taxa data.

col_vals

The column containing numeric values to be evaluated. Default = NULL

valid_min

Valid values range minimum (inclusive). Default = NULL

valid_max

Valid values range maximum (inclusive). Default = NULL

Details

Returns a data frame of the values from the input with counts (column = n) from the specified column. User provided valid_min and valid_max are applied to each set of values and evaluated as valid TRUE or FALSE.

The BioMonTools accepted values for TolVal are 0 - 10.

The BioMonTools accepted values for UFC are 1 - 6.

Value

A data frame with col_vals values, occurrence (n), and valid (TRUE/FALSE) within range of valid_min and valid_max.

Examples

# Example 1, TolVal
values_tv <- qc_taxa_values_numeric(data_benthos_MBSS, "TOLVAL", 0, 10)

## Plot
values_tv |>
    dplyr::filter(valid == TRUE) |>
    ggplot2::ggplot(ggplot2::aes(x = TOLVAL, y = n)) +
        ggplot2::geom_col() +
        ggplot2::coord_flip() +
        ggplot2::theme_bw() +
        ggplot2::labs(y = "N")

# Example , TolVal2
values_tv2 <- qc_taxa_values_numeric(data_benthos_MBSS, "TOLVAL2", 0, 10)

# Example 3, UFC
values_ufc <- qc_taxa_values_numeric(data_benthos_MBSS, "UFC", 1, 6)

## Plot
barplot(height = values_ufc$n,
        names.arg = values_ufc$UFC,
        las = 2,
        #xlab = "Name",
        ylab = "N")


BioMonTools documentation built on Aug. 5, 2026, 1:08 a.m.