Skip to contents

Computes the IQR magnitude of a vector

Usage

iqrs(x, na.rm = FALSE)

Arguments

x

A vector of values

na.rm

Logical. If `TRUE`, any `NA` and `NaN`'s are removed from `x` before the median and quantiles are computed.

Examples

iqrs(stats::rchisq(100, 2))
#>   [1] -0.26749441  1.79906960  0.17444641 -0.48429756 -0.24671710 -0.46638552
#>   [7]  0.09935527 -0.54567993  2.36286179 -0.28508029 -0.50123137  0.42981111
#>  [13]  0.25360656 -0.32630543 -0.02939016  0.01536369  1.34373023 -0.07057542
#>  [19] -0.21213597 -0.18612069 -0.29973161 -0.29035917 -0.42498011  1.08142995
#>  [25] -0.46965488  3.01620406 -0.11069031  0.26530259 -0.06671468  0.19009942
#>  [31] -0.46503274 -0.12692042 -0.12079579  0.24268981  0.91650255  0.41665968
#>  [37]  0.08446890 -0.03460516  1.07214619 -0.43735607  1.48117659 -0.44097620
#>  [43] -0.42487702 -0.35043776 -0.18882160  0.56112390 -0.01036883  2.72986911
#>  [49] -0.46810661  0.75869081  1.67407212 -0.26198039  0.14474634  0.71004852
#>  [55]  0.69547464 -0.15991336 -0.50943416 -0.31785536 -0.54433182 -0.29208839
#>  [61]  1.33855304  1.20620700 -0.35428605  0.78823366 -0.46491586  1.43851039
#>  [67]  0.36273069 -0.44606926  0.28659546 -0.27627628  1.84624178 -0.08936051
#>  [73]  1.47890332  1.32682102  1.65123442  0.11644345  3.71473682  0.59230263
#>  [79] -0.42516108  0.69934133  0.34900562 -0.11548773 -0.31873237 -0.26181355
#>  [85]  0.02861581  1.46408165 -0.35646281  0.21700419 -0.19561873 -0.03457967
#>  [91]  0.01222691  0.01036883 -0.27460628 -0.36686889  0.49545424  3.82846604
#>  [97] -0.21976802  0.70892853  0.79219554  0.77249962