获取 R 中多变量箱形图须的 X 值

Get the X value of multivariable box plot whiskers in R

我正在尝试获取箱线图中胡须的值。

我的数据样本是:
Company.ID ACTIVE Websource Company.Name Country Sector Ownership Activity.Status Update.Date MIN_MAX_REVENUE 16 Construction Private Number.of.Employees NOE splittedN splittedco splitted RR Range SECTORNUM

我想在绘制箱线图时找到胡须 Number.of.EmployeesSector

 boxplot(Data$Range ~ Data$Sector, ylab= "range", Xlab= "Sector", las=2)

得到其他人

boxplot(Data$Range ~ Data$Sector, ylab= "range", Xlab= "Sector", las=2)$out

[1]  18  16  12  35  15  65  45  25  50  40  30  32  30  50  45  65  80  35  35  40  90  25  60  30  40  25
 [27]  50  25  40  65  25  35  60  27 130  30 100  25  30  40  30  35  25  23 150  60  29  23  30  56  30  25
 [53]  22  23  40  80  30  32  22  30  28   7  25   8  10   7   8  11  30  10  10  32  10  10  40  20   8   2
 [79]   3   4   2  15  10   3   4   2   2   6   2   4   2   3   3   2   2   2   2   2  13   2   3   5   3   5
[105]   3   2   4   7   2   6   2   2   2   5   3   3   2   2   2   3   4   9   4  15   2   2   2  10   2   2
[131]   4  19   2   9   2   6   2   2   2   4   4   2  15   2   2   4   2   2   2  27   4   2   3   2   2   2
[157]   3  12   7   2  11   2   3   2   2   3   2   2   8  14   5   3   4 170   3   2   4   3   5   3   2   2
[183]   5   2   2   3   2   6   2   2   2   2   2   3   3   2  17   4   2   2   2   3   4   3   4   2   7   2
[209]   4   2   5   2   2  10   3  30  12  23  15  14  30 200  12  45  16  20  16  12  12  19  12  60  18  18
[235]  30  15  12  20  12  30  21  25  40  22  30  70  32  50  40  32  47  50  30  21  16  20  25  18  12  14
[261]  30  10  14  15  30  11   8  10  15   8  18   7  20  13  15  17  25  10  17   8  20  17  45   7  15   7
[287]  17   9   8   8   8  20  10  20  10  19  10  20  10   9  16   7  16  20  15   8  15  10  12  10   9  10
[313]   7  10  10  12   9  22  10   8  10   9  14   8   7  10  10  15  20   8  15  15  14   8  50  20  50  10
[339]  10  10  50   3  18   4  15   5   2   4  11   7  16  15   2   2   2   2   2   2   3   2   2   2   6   7
[365]   2   8   2   3   2   2   2   2   2   7   2   2   2   4   5   2   5   3   2   3   4   2   2  44   2   2
[391]   8   3   2  10  10   7  10  10  11  20  18  11   3  20   5   2   5   2   2   6  30   6   2   2  43  13
[417]  30  10  10  35  16  16  11  10  15  10   9   8  16   7  21   5  50  30   4   4  14  15   2   2   5   8
[443]   5  40   2   2   2   2   2   2  25   2   4   3   2   6   2  10   5   4   5   2   2   3   3   4   2   2
[469]  14   8   5   2   7   2   2   3  42  20  10  10  15  13  11  40  10  15  30  20   2   8   3   8   3   4
[495]   2   4   2   3   2   4   4   2   3  35   5   2   3   8   2   8   2   3  40  35   2   2   2   2   7   2
[521]   3   3   2  30  15   4  60   2  28   4   2   2   5  10   2   2   3   4  18   2   6   2   4   4   2   2
[547]  30   9   2   3  12   5   2   2   5   3   4   2  11   2   2   2   8   2   2   3   6   3   7   2   2   2
[573]   2  40  14   2   2   3   2   3   3  18  14   9  10  25  12  19  35  10  10  15  25  15  17  20  35  10

我需要有关这些异常值的完整信息 (company.Name...)

你首先需要四分位距

IQR = 75%quartile - 25% quartile,

然后你找到

upper whisker at min(max(x), 75%quartile+1.5*IQR) 
lower whisker at max(min(x), 25%quartiel+1.5*IQR)