mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 00:45:47 +00:00
include for-loop in cover snippets x 2
This commit is contained in:
parent
b8db524d04
commit
44c367bd8b
5 changed files with 26 additions and 2 deletions
|
|
@ -23,6 +23,14 @@ indices. Examples:
|
|||
% mlr stats1 -a min,mean,max,p10,p50,p90 -f flag,u,v data/*
|
||||
% mlr stats2 -a linreg-pca -f u,v -g shape data/*
|
||||
% mlr put -q '@sum[$a][$b] += $x; end {emit @sum, "a", "b"}' data/*
|
||||
% mlr --from estimates.tbl put '
|
||||
for (k,v in $*) {
|
||||
if (isnumeric(v) && k =~ "^[t-z].*$") {
|
||||
$sum += v; $count += 1
|
||||
}
|
||||
}
|
||||
$mean = $sum / $count # no assignment if count unset
|
||||
'
|
||||
```
|
||||
|
||||
This is something the Unix toolkit always could have done, and arguably always
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef MLRVERS_H
|
||||
#define MLRVERS_H
|
||||
// Manually increment on updates to https://github.com/johnkerl/miller/releases
|
||||
#define MLR_VERSION "v4.0.0-dev"
|
||||
#define MLR_VERSION "v4.1.0"
|
||||
#endif // MLRVERS_H
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
AC_PREREQ([2.60])
|
||||
# Manually increment on updates to https://github.com/johnkerl/miller/releases
|
||||
AC_INIT([mlr],[4.0.0-dev])
|
||||
AC_INIT([mlr],[4.1.0])
|
||||
AC_CONFIG_SRCDIR([c/mlrmain.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_AUX_DIR([autotools])
|
||||
|
|
|
|||
|
|
@ -7,3 +7,11 @@
|
|||
% mlr stats1 -a min,mean,max,p10,p50,p90 -f flag,u,v data/*
|
||||
% mlr stats2 -a linreg-pca -f u,v -g shape data/*
|
||||
% mlr put -q '@sum[$a][$b] += $x; end {emit @sum, "a", "b"}' data/*
|
||||
% mlr --from estimates.tbl put '
|
||||
for (k,v in $*) {
|
||||
if (isnumeric(v) && k =~ "^[t-z].*$") {
|
||||
$sum += v; $count += 1
|
||||
}
|
||||
}
|
||||
$mean = $sum / $count # no assignment if count unset
|
||||
'
|
||||
|
|
|
|||
|
|
@ -159,6 +159,14 @@ positional indices. For example:
|
|||
% mlr stats1 -a min,mean,max,p10,p50,p90 -f flag,u,v data/*
|
||||
% mlr stats2 -a linreg-pca -f u,v -g shape data/*
|
||||
% mlr put -q '@sum[$a][$b] += $x; end {emit @sum, "a", "b"}' data/*
|
||||
% mlr --from estimates.tbl put '
|
||||
for (k,v in $*) {
|
||||
if (isnumeric(v) && k =~ "^[t-z].*$") {
|
||||
$sum += v; $count += 1
|
||||
}
|
||||
}
|
||||
$mean = $sum / $count # no assignment if count unset
|
||||
'
|
||||
</pre>
|
||||
</div>
|
||||
<p/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue