Mark absorbance outliers
Arguments
- x
A
data.frame
orlist
containing adata.frame
namedqp
. See details.- ignore_outliers
Which sample types should have outliers marked?
Details
Input data.frame
must contain the following columns:
sample_type
. Character. Must contain values either "standard" or "unknown"index
. Numeric. Denotes sample number..abs
. Numeric. Contains absorbance values.
Examples
df <- data.frame(
sample_type = rep(c("standard", "unknown"), each = 3),
index = c(1, 1, 1, 2, 2, 2),
.abs = c(1, 1, 1, 1, 1, 2)
)
qp_mark_outliers(df, ignore_outliers = "all")
#> sample_type index .abs .is_outlier
#> 1 standard 1 1 FALSE
#> 2 standard 1 1 FALSE
#> 3 standard 1 1 FALSE
#> 4 unknown 2 1 FALSE
#> 5 unknown 2 1 FALSE
#> 6 unknown 2 2 TRUE
qp_mark_outliers(df, ignore_outliers = "standards")
#> sample_type index .abs .is_outlier
#> 1 standard 1 1 FALSE
#> 2 standard 1 1 FALSE
#> 3 standard 1 1 FALSE
#> 4 unknown 2 1 NA
#> 5 unknown 2 1 NA
#> 6 unknown 2 2 NA
qp_mark_outliers(df, ignore_outliers = "samples")
#> sample_type index .abs .is_outlier
#> 1 standard 1 1 NA
#> 2 standard 1 1 NA
#> 3 standard 1 1 NA
#> 4 unknown 2 1 FALSE
#> 5 unknown 2 1 FALSE
#> 6 unknown 2 2 TRUE
qp_mark_outliers(df, ignore_outliers = "none")
#> sample_type index .abs .is_outlier
#> 1 standard 1 1 NA
#> 2 standard 1 1 NA
#> 3 standard 1 1 NA
#> 4 unknown 2 1 NA
#> 5 unknown 2 1 NA
#> 6 unknown 2 2 NA