Disadvantages are missing when using plotplot boxplot () in R

Instead of R own, boxplot()when used gap.boxplot()from a package, there are plotrixno outliers values. I am trying to understand why.

See this example:

> mtcars[2,c('mpg')] <- 45
> mtcars[6,c('mpg')] <- 77

Using boxplot(mtcars$mpg), you can see two additional points (outliers) on top of the box.

own <code <code> boxplot () </code>

Use gap.boxplot(mtcars$mpg)from plotrixpackage result in this graphic

enter image description here

The big question is: why and how to solve it?

+4
source share
1 answer

, . gap.boxplot. , , . , .

gap.boxplot(mtcars$mpg)
outliers = gap.boxplot(mtcars$mpg)$out
points(x = rep(1,length(outliers)), y = c(outliers))
+3

Source: https://habr.com/ru/post/1665616/


All Articles