unique_outliers()
returns the unique outliers of a
numeric
vector based on the interquartile range
(IQR).
This function first removes duplicated values from the input vector x
to ensure that outlier detection is based on unique values. It then
calculates the first (Q1) and third (Q3) quartiles, as well as the IQR.
Outliers are defined as values that fall below Q1 - n_iqr * IQR
or above
Q3 + n_iqr * IQR
, where n_iqr
is a user-defined multiplier
(default is 1.5).
Value
A numeric
vector with the outliers of x
.
See also
Other utility functions:
closest_geobr_year()
,
fix_postal_code()
,
map_fill_data()
,
remove_unique_outliers()
,
test_geobr_connection()