Function that finds potential outlier observations
outliers(df, variables = NULL)
A dataframe
column names of given dataframe to process. By default all colnames of dataframe.
An information about outliers as a message It informed about outliers in individual columns and in all dataset.
library(isotree)
#> Warning: package 'isotree' was built under R version 4.2.3
library(toRpEDA)
library(glue)
outliers(iris)
#> For column Sepal.Length potential outliers indexes: 9, 14, 39, 43, 132. For column Sepal.Width potential outliers indexes: 15, 16, 33, 34, 61, 63, 69, 120. For column Petal.Length potential outliers indexes: 14, 15, 23, 36, 106, 118, 119, 123. For column Petal.Width potential outliers indexes: 101, 110, 145. Based on all columns: no outliers were found.
a <- c(1,2,3,42,1,1,0)
outliers(a)
#> Potential outlier indexes: 4, 7.