outlier_zscore_plot | R Documentation |
Test several Z-score thresholds to visualize outliers. Tidyverse friendly.
outlier_zscore_plot(df, var, group = NULL, thresh = c(2, 3, 5), top = 5)
df |
Dataframe. |
var |
Numeric variable. |
group |
Categorical variable. Grouping variable. |
thresh |
Numeric vector. Z-Score threshold for n standard deviations. |
top |
Integer. Show only n most frequent categorical values when
using the |
ggplot2 object
Other Outliers:
outlier_turkey()
,
outlier_zscore()
,
winsorize()
Sys.unsetenv("LARES_FONT") # Temporal
data(dft) # Titanic dataset
outlier_zscore_plot(dft, Fare)
p <- outlier_zscore_plot(dft, Fare, Pclass, thresh = c(3, 5))
plot(p)
attr(p, "z_values")
head(attr(p, "labels"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.