fb_outliers: Search for outliers in the field data

Description Usage Arguments Details Value Examples

View source: R/fb_outliers.R

Description

Search for outliers in the field data

Usage

1
fb_outliers(fbt, traits, max.sd = 3)

Arguments

fbt

A Field Book Table object.

traits

A character of traits for which outliers should be discovered. Defaults to all numeric traits.

max.sd

A numeric determining the number of standard deviations from the mean to use when labeling outliers.

Details

Outliers are defined as observations that are outside of a specified boundary as determined by the sample mean μ and standard deviation s. The lower limit of this boundary is μ - (\code{max.sd} * s) and the upper limit is μ + (\code{max.sd} * s).

The function prints a summary that includes the trait, sample mean, sample standard deviation, number of missing data points, and the upper and lower bounds of the outlier cutoff. Finally, the function prints the row from the fbt object in which the outlier was identified.

Value

A list of length n, where n is the number of traits. Each list element is a data.frame containing the outliers.

Examples

1
2
3
data("fbt_sample")

outliers <- fb_outliers(fbt = fbt_sample, traits = "OneOutlier", max.sd = 3)

neyhartj/fbutils documentation built on Feb. 10, 2020, 1:45 p.m.