r - 更改箱线图中的异常值规则

标签 r boxplot

我在 R 中构建了一些箱线图并有几个异常值。我知道设置异常值限制的默认标准是:

  • Q3 + 1.5*IQR
  • Q1 - 1.5* IQR

  • 但是,我希望将异常值归类为超出边界的值:
  • Q3 + 3*IQR
  • Q1 - 3* IQR

  • 是否可以在 R 中设置它?

    最佳答案

    来自 ?boxplot

    range: this determines how far the plot whiskers extend out from the box. If ‘range’ is positive, the whiskers extend to the most extreme data point which is no more than ‘range’ times the interquartile range from the box. A value of zero causes the whiskers to extend to the data extremes.


    所以设置range=3

    关于r - 更改箱线图中的异常值规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4994313/

    相关文章:

    r - 从执行顺序操作的向量创建三角矩阵

    performance - R 中的执行效率与程序员效率

    python - matplotlib 填充箱线图的边框颜色

    r - 分组箱线图 r ggplot2

    python - 使用seaborn从列表列中分组箱线图

    python - python中的重叠箱线图

    r - 相对于前两个值绘制第三个值

    r - 如果最后/第一个字符不是字母/数字,如何删除它们?

    R:如何汇总 Data.Tree 中叶子和节点的数据?

    python - 在 matplotlib/seaborn 中向箱线图添加图例