Extract statistics from boxplot

前端 未结 2 1140
余生分开走
余生分开走 2020-12-21 14:48

I\'ve already tried searching but I\'ve found nothing similar. I have a dataset containing temperatures, and another dataset containing 23 tipes of terrain (categorical vari

2条回答
  •  伪装坚强ぢ
    2020-12-21 15:05

    Try the following:

    res <-  boxplot(len ~ dose, data = ToothGrowth)
    res
    

    giving:

    $stats
          [,1]  [,2]  [,3]
    [1,]  4.20 13.60 18.50
    [2,]  7.15 16.00 23.45
    [3,]  9.85 19.25 25.95
    [4,] 13.00 23.45 28.35
    [5,] 21.50 27.30 33.90
    
    $n
    [1] 20 20 20
    
    $conf
              [,1]     [,2]     [,3]
    [1,]  7.783202 16.61792 24.21884
    [2,] 11.916798 21.88208 27.68116
    
    $out
    numeric(0)
    
    $group
    numeric(0)
    
    $names
    [1] "0.5" "1"   "2"  
    

提交回复
热议问题