Description Usage Arguments Value Examples
View source: R/outlier_identifier.R
A function that identify and summarize the count and range of based on the method the user choose
1 2 3 4 5 6 | outlier_identifier(
dataframe,
columns = NULL,
identifier = "IQR",
return_df = FALSE
)
|
dataframe |
The target dataframe(data.frame) where the function is performed |
columns |
The target vector of columns where the function needed to be performed. Default is NULL, the function will check all columns |
identifier |
The method of identifying outliers. |
return_df |
Can be set to TRUE if want output as dataframe(data.frame) identified with outliers in rows |
A dataframe(data.frame) with the summary of the outlier identified by the method) if return_df = FALSE, A dataframe(data.frame) with additional column having if row has outlier or not) if return_df = TRUE
1 2 3 4 5 6 7 8 | library(tidyverse)
df = data.frame(SepalLengthCm = c(5.1, 4.9, 4.7, 5.5, 5.1, 50, 54, 5.0, 5.2, 5.3, 5.1),
SepalWidthCm = c(1.4, 1.4, 20, 2.0, 0.7, 1.6, 1.2, 1.4, 1.8, 1.5, 2.1),
PetalWidthCm = c(0.2, 0.2, 0.2, 0.3, 0.4, 0.5, 0.5, 0.6, 0.4, 0.2, 5))
outlier_identifier(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.