powered by
Visualizes the distribution of a variable and highlights detected outliers in red. It combines a boxplot (for context) and jittered points (for individual data visibility).
plot_outliers(data, column, method = "zscore", threshold = 3)
A ggplot object. You can add more layers to it using +.
+
A data frame.
The name of the numeric column to plot.
"zscore" or "iqr". Defaults to "zscore".
Numeric. Defaults to 3 for zscore, 1.5 for IQR.
library(ggplot2) df <- data.frame(val = c(rnorm(50), 10)) # 50 normal points and one outlier plot_outliers(df, "val", method = "iqr")
Run the code above in your browser using DataLab