summarize_qc: Summarize Quality Control Results

Description Usage Arguments Details Value

Description

summary_qc is a function that summarizes quality checking results in a form of table or plot.

Usage

1
2
summarize_qc(x, var, na.as = NA, cumul = FALSE, additive = FALSE,
  plot = FALSE, perc = TRUE, flux = NULL)

Arguments

x

A data frame with column names.

na.as

A vector of numeric or NA values for the qc_names subset of x that determines how should be the missing flags interpreted. If only one value is provided, all columns are treated the same way.

cumul

A logical value that determines if cumulative (cumul = TRUE) or individual (cumul = FALSE) effects of quality control flags should be shown.

additive

A vector of logical values (TRUE or FALSE) for the qc_names subset of x that determines if the flags should be treated as additive (additive = TRUE) or with fixed effect (additive = FALSE). If only one value is provided, all columns are considered to be of the same type.

plot

A logical value. If TRUE, the results are plotted in the active graphical device. If FALSE, they are represented as a table.

perc

A logical value. If TRUE, the results are reported in percentages. If FALSE, counts are used instead.

flux

A character string. Used only if plot = TRUE. Includes the flux name in the plot title to emphasize the relevance of displayed test types.

qc_names

A vector of names of data frame columns to combine.

Details

summary_qc loads a data frame x, extracts quality control columns from it based on qc_names and creates a table (plot = FALSE) or a plot (plot = TRUE) for these columns. Results are displayed in percentage (perc = TRUE) or counts (perc = FALSE) of given flag per dataset.

cumul = TRUE specifies that cumulative effect of flags is considered for each halfhour. Note that for cumul = TRUE the results do depend on the order of qc_names. The flags on each row are cumulatively summed from left to right. additive is used only if cumul = TRUE, otherwise skipped.

Adapted from: openeddy - summarize_QC

Value

A table or a plot depending on the plot argument value.


grahamstewart12/tidyflux documentation built on June 4, 2019, 7:44 a.m.