* Fix #1146

* added a doc link

* update unit-test case
This commit is contained in:
John Kerl 2022-12-29 11:58:50 -07:00 committed by GitHub
parent 5862a9c7ae
commit a55e78c45a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 23 deletions

View file

@ -27,6 +27,7 @@ key-value-pair data in a variety of data formats.
# Getting started
* [Miller in 10 minutes](https://miller.readthedocs.io/en/latest/10min)
* [A Guide To Command-Line Data Manipulation](https://www.smashingmagazine.com/2022/12/guide-command-line-data-manipulation-cli-miller)
* [A quick tutorial on Miller](https://www.ict4g.net/adolfo/notes/data-analysis/miller-quick-tutorial.html)
* [Tools to manipulate CSV files from the Command Line](https://www.ict4g.net/adolfo/notes/data-analysis/tools-to-manipulate-csv.html)
* [www.togaware.com/linux/survivor/CSV_Files.html](https://www.togaware.com/linux/survivor/CSV_Files.html)

View file

@ -261,11 +261,11 @@ func (tr *TransformerHistogram) emitNonAuto(
outrec.PutReference(
tr.outputPrefix+"bin_lo",
mlrval.FromFloat((tr.lo+float64(i))/tr.mul),
mlrval.FromFloat(tr.lo+float64(i)/tr.mul),
)
outrec.PutReference(
tr.outputPrefix+"bin_hi",
mlrval.FromFloat((tr.lo+float64(i+1))/tr.mul),
mlrval.FromFloat(tr.lo+float64(i+1)/tr.mul),
)
for _, valueFieldName := range tr.valueFieldNames {

View file

@ -1 +1 @@
mlr --opprint histogram -f x,y --lo 0 --hi 1 --nbins 20 -o foo_ test/input/small
mlr --opprint histogram -f x,y --lo 0.1 --hi 0.9 --nbins 20 -o foo_ test/input/small

View file

@ -1,21 +1,21 @@
foo_bin_lo foo_bin_hi foo_x_count foo_y_count
0.00000000 0.05000000 1 0
0.05000000 0.10000000 0 0
0.10000000 0.15000000 0 1
0.15000000 0.20000000 0 1
0.20000000 0.25000000 1 0
0.25000000 0.30000000 0 0
0.30000000 0.35000000 1 1
0.35000000 0.40000000 1 0
0.40000000 0.45000000 0 0
0.45000000 0.50000000 0 1
0.50000000 0.55000000 2 1
0.55000000 0.60000000 2 0
0.60000000 0.65000000 1 0
0.65000000 0.70000000 0 0
0.70000000 0.75000000 0 2
0.75000000 0.80000000 1 0
0.80000000 0.85000000 0 0
0.85000000 0.90000000 0 1
0.90000000 0.95000000 0 0
0.95000000 1.00000000 0 2
0.10000000 0.14000000 0 1
0.14000000 0.18000000 0 0
0.18000000 0.22000000 1 1
0.22000000 0.26000000 0 0
0.26000000 0.30000000 0 0
0.30000000 0.34000000 0 1
0.34000000 0.38000000 1 0
0.38000000 0.42000000 1 0
0.42000000 0.46000000 0 0
0.46000000 0.50000000 0 1
0.50000000 0.54000000 2 1
0.54000000 0.58000000 1 0
0.58000000 0.62000000 2 0
0.62000000 0.66000000 0 0
0.66000000 0.70000000 0 0
0.70000000 0.74000000 0 1
0.74000000 0.78000000 1 1
0.78000000 0.82000000 0 0
0.82000000 0.86000000 0 0
0.86000000 0.90000000 0 1