find_outlier: Find outliers in a vector

Description Usage Arguments Details Value

View source: R/find_outlier.R

Description

find_outlier returns the index of a vector where outliers occur. Outliers are defined as values that exceed the number of standard deviations passed to the function as a threshold value.

Usage

1
find_outlier(x, threshold = 3)

Arguments

x

A numeric vector of values

threshold

Indices of values that are farther from the mean than the threshold times the deviation are removed. The standard deviation is obtained using [sd()]. The default value is threshold = 3.

Details

The function[sd_pop()] is used to obtain the population standard deviation. This function will remove NA and NaN values.

Value

A numeric vector of the indices of outliers.


awqx/qsarr documentation built on Oct. 2, 2021, 7:05 a.m.