aggregate_tests: Aggregate Test Results

Description Usage Arguments Value Examples

View source: R/aggregate.r

Description

Aggregate the results of multiple tests.

Usage

1
2
3
4
5
aggregate_tests(
  ...,
  by = c("odwg", "highest", "lowest", "majority"),
  na.rm = TRUE
)

Arguments

...

One of more vectors of test results.

by

The method to use for aggregating. When by = "highest" the largest flag value from the set of tests as the indicator of the overall quality of the observation. When by = "lowest" the smallest flag value from the set of tests as the indicator of the overall quality of the observation. When by = "majority" a majority-vote algorithm is used to determine the overall quality of the observation.

na.rm

Logical indicating whether missing flags should be ignored when calculating the aggregate flag.

Value

An integer vector of test flags.

Examples

1
2
3
flags = replicate(3, sample(c(1L,3L,4L), 10, replace = TRUE))
aggregate_tests(flags[,1], flags[,2], flags[,3])
aggregate_tests(flags[,1], flags[,2], flags[,3], by = "majority")

mkoohafkan/wqptools documentation built on May 2, 2021, 8:12 p.m.