user7810116 user7810116 - 5 months ago 14
R Question

What is the meaning of "out" object for box plot in R?

Suppose this is my data set:

ID<- seq(1:50)
mou<-sample(c(2000, 2500, 440, 4990, 23000, 450, 3412, 4958,745,1000), 50, replace= TRUE)
calls<-sample(c(50, 51, 12, 60, 90, 888, 444, 668, 16, 89, 222,33, 243, 239, 333, 645,23, 50,555), 50, replace= TRUE)
rev<- sample(c(100, 345, 758, 44, 58, 334, 50000, 888, 205, 940,298, 754), 50, replace= TRUE)
dt<- data.frame(mou, calls, rev)


I did the box plot for calls and while analyzing it, I saw the following objects for the boxplot.

x<-boxplot(dt$calls)
names(x)
> names(x)
[1] "stats" "n" "conf" "out" "group" "names"


Looking at the output for x$stats, I figured that stats object gives me the lower whisker the lower hinge, the median, the the upper hinge and the upper whisker for each group. But i am little bit confused what the object "out" really mean? Does this signify the outlier values or something else?
The out object for my boxplot gives the following results:

> x$out
[1] 555 10000 555 555 555 555 555 10000

Answer Source

It gives you: "The values of any data points which lie beyond the extremes of the whiskers"

Take a look at here for more insight.

Consider asking this kind of question at other communities like Data Science or Cross Validated.