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]  2.39438800  0.41256908 -0.50465827 -0.27094009  2.31538716  0.30994724
#>   [7]  1.94758187 -0.24850395 -0.46976331  0.10007485 -0.54963201  2.37997475
#>  [13] -0.28714498 -0.50486152  0.43292401  0.25544330 -0.32866869 -0.02960301
#>  [19]  0.01547496  1.35346216 -0.07108656 -0.21367236 -0.18746867 -0.30190241
#>  [25] -0.29246209 -0.42805802  1.08926218 -0.47305635  3.03804883 -0.11149198
#>  [31]  0.26722403 -0.06719786  0.19147621 -0.46840072 -0.12783963 -0.12167065
#>  [37]  0.24444748  0.92314030  0.41967733  0.08508066 -0.03485579  1.07991118
#>  [43] -0.44052361  1.49190398 -0.44416996 -0.42795419 -0.35297579 -0.19018914
#>  [49]  0.56518783 -0.01044392  2.74964011 -0.47149686  0.76418560  1.68619654
#>  [55] -0.26387778  0.14579466  0.71519103  0.70051160 -0.16107153 -0.51312373
#>  [61] -0.32015742 -0.54827412 -0.29420383  1.34824748  1.21494292 -0.35685195
#>  [67]  0.79394242 -0.46828300  1.44892877  0.36535776 -0.44929990  0.28867112
#>  [73] -0.27827720  1.85961314 -0.09000770  1.48961424  1.33643049  1.66319344
#>  [79]  0.11728679  3.74164070  0.59659236 -0.42824029  0.70440629  0.35153328
#>  [85] -0.11632415 -0.32104078 -0.26370973  0.02882305  1.47468523 -0.35904449
#>  [91]  0.21857584 -0.19703550 -0.03483011  0.01231546  0.01044392 -0.27659511
#>  [97] -0.36952592  0.49904256  3.85619360 -0.22135968