plot_outliers_mad: Plotting function for the mad

Description Usage Arguments Value Examples

View source: R/plot_outliers_mad.R

Description

plotting data and highlighting univariate outliers detected with the outliers_mad function

Usage

1
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

1
2
3
4
5
6
7
8
9
#### 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)

mdelacre/Routliers documentation built on Oct. 10, 2020, 5:02 a.m.