plot_outliers_mad {Routliers}R Documentation

Plotting function for the mad

Description

plotting data and highlighting univariate outliers detected with the outliers_mad function

Usage

plot_outliers_mad(res, x, pos_display = FALSE)

Arguments

res

result of the outliers_mad function from which we want to create a plot

x

data from which the outliers_mad function was performed

pos_display

set whether the position of outliers in the dataset should be displayed on the graph (pos_display = TRUE) or not (pos_display = FALSE)

Value

None

Examples


#### Run outliers_mad and perform plot_outliers_mad on the result
data(Intention)
res=outliers_mad(Intention$age)
plot_outliers_mad(res,x=Intention$age)

### when the number of outliers is small, one can display the outliers position in the dataset
x=c(rnorm(10),3)
res2=outliers_mad(x)
plot_outliers_mad(res2,x,pos_display=TRUE)

[Package Routliers version 0.0.0.3 Index]