Examples for 'iNZightTools::survey_IQR'


Interquartile range function for surveys

Aliases: survey_IQR

Keywords:

### ** Examples

library(survey)
Loading required package: grid
Loading required package: Matrix
Loading required package: survival
Attaching package: 'survey'
The following object is masked from 'package:graphics':

    dotchart
library(srvyr)
Attaching package: 'srvyr'
The following object is masked from 'package:rcloud.support':

    select
The following object is masked from 'package:stats':

    filter
data(api)

dstrata <- apistrat %>%
as_survey(strata = stype, weights = pw)

dstrata %>%
  summarise(api99_iqr = survey_IQR(api99))
# A tibble: 1 × 1
  api99_iqr
      <dbl>
1       202

[Package iNZightTools version 1.12.2 Index]