docs/src/statistics-examples.md
For one or more specified field names, simply compute p25 and p75, then write the IQR as the difference of p75 and p25:
<pre class="pre-highlight-in-pair"> <b>mlr --oxtab stats1 -f x -a p25,p75 \</b> <b> then put '$x_iqr = $x_p75 - $x_p25' \</b> <b> data/medium</b> </pre> <pre class="pre-non-highlight-in-pair"> x_p25 0.24667037823231752 x_p75 0.7481860062358446 x_iqr 0.5015156280035271 </pre>For wildcarded field names, first compute p25 and p75, then loop over field names with p25 in them:
This might be more elegantly implemented as an option within the stats1 verb. Meanwhile, it's expressible within the DSL: