From 5e9720978770e6fa43e7457f4e37e5bcf1c1127e Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sat, 21 Nov 2020 23:35:34 -0500 Subject: [PATCH] reg-test refactor iterate --- c/case-todo | 23 - c/make-case | 10 + c/reg_test/case-clean-whitespace.sh | 10 + c/reg_test/case-format-values.sh | 4 + c/reg_test/case-join-mixed-format.sh | 72 + c/reg_test/case-join-prepipe.sh | 3 + c/reg_test/case-join.sh | 90 + c/reg_test/case-nest.sh | 20 + c/reg_test/case-nothing.sh | 5 + c/reg_test/case-remove-empty-columns.sh | 1 + c/reg_test/case-repeat.sh | 4 + c/reg_test/case-reshape.sh | 18 + c/reg_test/case-skip-trivial-records.sh | 1 + c/reg_test/case-sort-within-records.sh | 1 + .../expected/case-clean-whitespace.sh.out | 163 ++ c/reg_test/expected/case-format-values.sh.out | 49 + .../expected/case-join-mixed-format.sh.out | 324 ++++ c/reg_test/expected/case-join-prepipe.sh.out | 31 + c/reg_test/expected/case-join.sh.out | 1611 +++++++++++++++++ c/reg_test/expected/case-nest.sh.out | 97 + c/reg_test/expected/case-nothing.sh.out | 11 + .../expected/case-remove-empty-columns.sh.out | 7 + c/reg_test/expected/case-repeat.sh.out | 77 + c/reg_test/expected/case-reshape.sh.out | 165 ++ .../expected/case-skip-trivial-records.sh.out | 7 + .../expected/case-sort-within-records.sh.out | 13 + 26 files changed, 2794 insertions(+), 23 deletions(-) create mode 100755 c/make-case create mode 100644 c/reg_test/case-clean-whitespace.sh create mode 100644 c/reg_test/case-format-values.sh create mode 100644 c/reg_test/case-join-mixed-format.sh create mode 100644 c/reg_test/case-join-prepipe.sh create mode 100644 c/reg_test/case-join.sh create mode 100644 c/reg_test/case-nest.sh create mode 100644 c/reg_test/case-nothing.sh create mode 100644 c/reg_test/case-remove-empty-columns.sh create mode 100644 c/reg_test/case-repeat.sh create mode 100644 c/reg_test/case-reshape.sh create mode 100644 c/reg_test/case-skip-trivial-records.sh create mode 100644 c/reg_test/case-sort-within-records.sh create mode 100644 c/reg_test/expected/case-clean-whitespace.sh.out create mode 100644 c/reg_test/expected/case-format-values.sh.out create mode 100644 c/reg_test/expected/case-join-mixed-format.sh.out create mode 100644 c/reg_test/expected/case-join-prepipe.sh.out create mode 100644 c/reg_test/expected/case-join.sh.out create mode 100644 c/reg_test/expected/case-nest.sh.out create mode 100644 c/reg_test/expected/case-nothing.sh.out create mode 100644 c/reg_test/expected/case-remove-empty-columns.sh.out create mode 100644 c/reg_test/expected/case-repeat.sh.out create mode 100644 c/reg_test/expected/case-reshape.sh.out create mode 100644 c/reg_test/expected/case-skip-trivial-records.sh.out create mode 100644 c/reg_test/expected/case-sort-within-records.sh.out diff --git a/c/case-todo b/c/case-todo index 062726e98..90922a824 100644 --- a/c/case-todo +++ b/c/case-todo @@ -10,29 +10,6 @@ -## ---------------------------------------------------------------- -#announce NEST -# -#run_mlr cat $indir/nest-explode.dkvp -#run_mlr cat $indir/nest-explode-vary-fs-ps.dkvp -# -#run_mlr nest --explode --values --across-fields -f x $indir/nest-explode.dkvp -#run_mlr nest --explode --values --across-fields -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp -# -#run_mlr nest --explode --values --across-fields -f x then nest --implode --values --across-fields -f x $indir/nest-explode.dkvp -#run_mlr nest --explode --values --across-fields -f x --nested-fs pipe --nested-ps = then nest --implode --values --across-fields -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp -# -#run_mlr nest --explode --values --across-records -f x $indir/nest-explode.dkvp -#run_mlr nest --explode --values --across-records -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp -# -#run_mlr nest --explode --values --across-records -f x then nest --implode --values --across-records -f x $indir/nest-explode.dkvp -#run_mlr nest --explode --values --across-records -f x --nested-fs pipe --nested-ps = then nest --implode --values --across-records -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp -# -#run_mlr nest --explode --pairs --across-fields -f x $indir/nest-explode.dkvp -#run_mlr nest --explode --pairs --across-fields -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp -# -#run_mlr nest --explode --pairs --across-records -f x $indir/nest-explode.dkvp -#run_mlr nest --explode --pairs --across-records -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp ## ---------------------------------------------------------------- #announce FILL-DOWN diff --git a/c/make-case b/c/make-case new file mode 100755 index 000000000..bd0abd261 --- /dev/null +++ b/c/make-case @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "Usage: $0 {case name}" 1>&2 + exit 1 +fi +name="$1" +shift + +cat "$@" | uind -s > reg_test/case-${name}.sh diff --git a/c/reg_test/case-clean-whitespace.sh b/c/reg_test/case-clean-whitespace.sh new file mode 100644 index 000000000..a92c7130a --- /dev/null +++ b/c/reg_test/case-clean-whitespace.sh @@ -0,0 +1,10 @@ +run_mlr --icsv --ojson cat $indir/clean-whitespace.csv +run_mlr --icsv --ojson put '$a = lstrip($a)' $indir/clean-whitespace.csv +run_mlr --icsv --ojson put '$a = rstrip($a)' $indir/clean-whitespace.csv +run_mlr --icsv --ojson put '$a = strip($a)' $indir/clean-whitespace.csv +run_mlr --icsv --ojson put '$a = collapse_whitespace($a)' $indir/clean-whitespace.csv +run_mlr --icsv --ojson put '$a = clean_whitespace($a)' $indir/clean-whitespace.csv + +run_mlr --icsv --ojson clean-whitespace -k $indir/clean-whitespace.csv +run_mlr --icsv --ojson clean-whitespace -v $indir/clean-whitespace.csv +run_mlr --icsv --ojson clean-whitespace $indir/clean-whitespace.csv diff --git a/c/reg_test/case-format-values.sh b/c/reg_test/case-format-values.sh new file mode 100644 index 000000000..3ca70dfb5 --- /dev/null +++ b/c/reg_test/case-format-values.sh @@ -0,0 +1,4 @@ +run_mlr format-values $indir/abixy +run_mlr format-values -n $indir/abixy +run_mlr format-values -i %08llx -f %.6le -s X%sX $indir/abixy +run_mlr format-values -i %08llx -f %.6le -s X%sX -n $indir/abixy diff --git a/c/reg_test/case-join-mixed-format.sh b/c/reg_test/case-join-mixed-format.sh new file mode 100644 index 000000000..59f91008e --- /dev/null +++ b/c/reg_test/case-join-mixed-format.sh @@ -0,0 +1,72 @@ +# in1, in2, out all same formats +run_mlr --json join -s -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.json +run_mlr --dkvp join -s -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -s -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.csv + +run_mlr --json join -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.json +run_mlr --dkvp join -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.csv + +# in2 different format +run_mlr --json join -s -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.json +run_mlr --dkvp join -s -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -s -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.csv + +run_mlr --json join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.json +run_mlr --dkvp join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.csv + +run_mlr --json join -s -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.json +run_mlr --dkvp join -s -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -s -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.csv + +run_mlr --json join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.json +run_mlr --dkvp join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.csv + +run_mlr --json join -s -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.json +run_mlr --dkvp join -s -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -s -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.csv + +run_mlr --json join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.json +run_mlr --dkvp join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.dkvp +run_mlr --csvlite join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.csv + +# vary all three +run_mlr --ijson --ojson join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.json +run_mlr --idkvp --ojson join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --ojson join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.csv + +run_mlr --ijson --ojson join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.json +run_mlr --idkvp --ojson join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --ojson join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.csv + +run_mlr --ijson --ojson join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.json +run_mlr --idkvp --ojson join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --ojson join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.csv + + +run_mlr --ijson --odkvp join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.json +run_mlr --idkvp --odkvp join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --odkvp join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.csv + +run_mlr --ijson --odkvp join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.json +run_mlr --idkvp --odkvp join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --odkvp join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.csv + +run_mlr --ijson --odkvp join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.json +run_mlr --idkvp --odkvp join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --odkvp join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.csv + + +run_mlr --ijson --ocsvlite join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.json +run_mlr --idkvp --ocsvlite join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --ocsvlite join -i csvlite -j x -f $indir/multi-format-join-a.csv $indir/multi-format-join-b.csv + +run_mlr --ijson --ocsvlite join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.json +run_mlr --idkvp --ocsvlite join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --ocsvlite join -i dkvp -j x -f $indir/multi-format-join-a.dkvp $indir/multi-format-join-b.csv + +run_mlr --ijson --ocsvlite join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.json +run_mlr --idkvp --ocsvlite join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.dkvp +run_mlr --icsvlite --ocsvlite join -i json -j x -f $indir/multi-format-join-a.json $indir/multi-format-join-b.csv diff --git a/c/reg_test/case-join-prepipe.sh b/c/reg_test/case-join-prepipe.sh new file mode 100644 index 000000000..6a3e24f51 --- /dev/null +++ b/c/reg_test/case-join-prepipe.sh @@ -0,0 +1,3 @@ +run_mlr --prepipe cat --odkvp join -j a -f $indir/join-het.dkvp $indir/abixy-het +run_mlr --odkvp join --prepipe cat -j a -f $indir/join-het.dkvp $indir/abixy-het +run_mlr --prepipe cat --odkvp join --prepipe cat -j a -f $indir/join-het.dkvp $indir/abixy-het diff --git a/c/reg_test/case-join.sh b/c/reg_test/case-join.sh new file mode 100644 index 000000000..ca3f4f785 --- /dev/null +++ b/c/reg_test/case-join.sh @@ -0,0 +1,90 @@ +# ---------------------------------------------------------------- +announce JOIN + +run_mlr --opprint join -s -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --ul -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --ul -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --ul --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --ul --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --np --ul -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --np --ul -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --np --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --np --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --np --ul --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --np --ul --ur -f $indir/joina.dkvp -l l -r r -j o $indir/joinb.dkvp + +run_mlr join -l l -r r -j j -f $indir/joina.dkvp $indir/joinb.dkvp +run_mlr join -l l -j r -f $indir/joina.dkvp $indir/joinb.dkvp +run_mlr join -r r -j l -f $indir/joina.dkvp $indir/joinb.dkvp + +run_mlr --opprint join -s -f /dev/null -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join -f /dev/null -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --ul -f /dev/null -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --ul -f /dev/null -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --ul --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --ul --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --np --ul -f /dev/null -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --np --ul -f /dev/null -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --np --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --np --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp + +run_mlr --opprint join -s --np --ul --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp +run_mlr --opprint join --np --ul --ur -f /dev/null -l l -r r -j o $indir/joinb.dkvp + + +run_mlr --opprint join -s -f $indir/joina.dkvp -l l -r r -j o /dev/null +run_mlr --opprint join -f $indir/joina.dkvp -l l -r r -j o /dev/null + +run_mlr --opprint join -s --ul -f $indir/joina.dkvp -l l -r r -j o /dev/null +run_mlr --opprint join --ul -f $indir/joina.dkvp -l l -r r -j o /dev/null + +run_mlr --opprint join -s --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null +run_mlr --opprint join --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null + +run_mlr --opprint join -s --ul --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null +run_mlr --opprint join --ul --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null + +run_mlr --opprint join -s --np --ul -f $indir/joina.dkvp -l l -r r -j o /dev/null +run_mlr --opprint join --np --ul -f $indir/joina.dkvp -l l -r r -j o /dev/null + +run_mlr --opprint join -s --np --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null +run_mlr --opprint join --np --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null + +run_mlr --opprint join -s --np --ul --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null +run_mlr --opprint join --np --ul --ur -f $indir/joina.dkvp -l l -r r -j o /dev/null + +run_mlr --odkvp join -j a -f $indir/join-het.dkvp $indir/abixy-het +run_mlr --odkvp join -j a -f $indir/abixy-het $indir/join-het.dkvp +run_mlr --odkvp join --np --ul --ur -j a -f $indir/join-het.dkvp $indir/abixy-het +run_mlr --odkvp join --np --ul --ur -j a -f $indir/abixy-het $indir/join-het.dkvp + +run_mlr --idkvp --oxtab join --lp left_ --rp right_ -j i -f $indir/abixy-het $indir/abixy-het + +for sorted_flag in "-s" ""; do + for pairing_flags in "" "--np --ul" "--np --ur"; do + for i in 1 2 3 4 5 6; do + run_mlr join $sorted_flag $pairing_flags -l l -r r -j j -f $indir/het-join-left $indir/het-join-right-r$i + for j in 1 2 3 4 5 6; do + if [ "$i" -le "$j" ]; then + run_mlr join $sorted_flag $pairing_flags -l l -r r -j j -f $indir/het-join-left $indir/het-join-right-r$i$j + fi + done + done + done +done diff --git a/c/reg_test/case-nest.sh b/c/reg_test/case-nest.sh new file mode 100644 index 000000000..090e1f364 --- /dev/null +++ b/c/reg_test/case-nest.sh @@ -0,0 +1,20 @@ +run_mlr cat $indir/nest-explode.dkvp +run_mlr cat $indir/nest-explode-vary-fs-ps.dkvp + +run_mlr nest --explode --values --across-fields -f x $indir/nest-explode.dkvp +run_mlr nest --explode --values --across-fields -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp + +run_mlr nest --explode --values --across-fields -f x then nest --implode --values --across-fields -f x $indir/nest-explode.dkvp +run_mlr nest --explode --values --across-fields -f x --nested-fs pipe --nested-ps = then nest --implode --values --across-fields -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp + +run_mlr nest --explode --values --across-records -f x $indir/nest-explode.dkvp +run_mlr nest --explode --values --across-records -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp + +run_mlr nest --explode --values --across-records -f x then nest --implode --values --across-records -f x $indir/nest-explode.dkvp +run_mlr nest --explode --values --across-records -f x --nested-fs pipe --nested-ps = then nest --implode --values --across-records -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp + +run_mlr nest --explode --pairs --across-fields -f x $indir/nest-explode.dkvp +run_mlr nest --explode --pairs --across-fields -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp + +run_mlr nest --explode --pairs --across-records -f x $indir/nest-explode.dkvp +run_mlr nest --explode --pairs --across-records -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp diff --git a/c/reg_test/case-nothing.sh b/c/reg_test/case-nothing.sh new file mode 100644 index 000000000..0b381cd8f --- /dev/null +++ b/c/reg_test/case-nothing.sh @@ -0,0 +1,5 @@ +run_mlr cat then nothing < $indir/abixy +run_mlr cat then nothing $indir/abixy +run_mlr tac then nothing $indir/abixy +run_mlr cat then nothing $indir/abixy $indir/abixy +run_mlr cat then nothing then cat $indir/abixy diff --git a/c/reg_test/case-remove-empty-columns.sh b/c/reg_test/case-remove-empty-columns.sh new file mode 100644 index 000000000..44ac8ee72 --- /dev/null +++ b/c/reg_test/case-remove-empty-columns.sh @@ -0,0 +1 @@ +run_mlr --csv remove-empty-columns $indir/remove-empty-columns.csv diff --git a/c/reg_test/case-repeat.sh b/c/reg_test/case-repeat.sh new file mode 100644 index 000000000..0cca7473b --- /dev/null +++ b/c/reg_test/case-repeat.sh @@ -0,0 +1,4 @@ +run_mlr repeat -n 5 $indir/repeat-input.dat +run_mlr repeat -f a $indir/repeat-input.dat +run_mlr repeat -f b $indir/repeat-input.dat +run_mlr repeat -f c $indir/repeat-input.dat diff --git a/c/reg_test/case-reshape.sh b/c/reg_test/case-reshape.sh new file mode 100644 index 000000000..30873d7a6 --- /dev/null +++ b/c/reg_test/case-reshape.sh @@ -0,0 +1,18 @@ +run_mlr --pprint reshape -i X,Y,Z -o item,price $indir/reshape-wide.tbl +run_mlr --pprint reshape -i X,Z -o item,price $indir/reshape-wide.tbl +run_mlr --pprint reshape -r '[X-Z]' -o item,price $indir/reshape-wide.tbl +run_mlr --pprint reshape -r '[XZ]' -o item,price $indir/reshape-wide.tbl + +run_mlr --pprint reshape -s item,price $indir/reshape-long.tbl + +run_mlr --pprint reshape -i X,Y,Z -o item,price then reshape -s item,price $indir/reshape-wide.tbl +run_mlr --pprint reshape -s item,price then reshape -i X,Y,Z -o item,price $indir/reshape-long.tbl + +run_mlr reshape -i X,Y,Z -o item,price $indir/reshape-wide-ragged.dkvp +run_mlr reshape -i X,Z -o item,price $indir/reshape-wide-ragged.dkvp +run_mlr reshape -r '[X-Z]' -o item,price $indir/reshape-wide-ragged.dkvp +run_mlr reshape -r '[XZ]' -o item,price $indir/reshape-wide-ragged.dkvp + +run_mlr reshape -s item,price $indir/reshape-long-ragged.dkvp + +run_mlr --json reshape -i x,y -o item,value $indir/small-non-nested.json diff --git a/c/reg_test/case-skip-trivial-records.sh b/c/reg_test/case-skip-trivial-records.sh new file mode 100644 index 000000000..72e359221 --- /dev/null +++ b/c/reg_test/case-skip-trivial-records.sh @@ -0,0 +1 @@ +run_mlr --csv skip-trivial-records $indir/trivial-records.csv diff --git a/c/reg_test/case-sort-within-records.sh b/c/reg_test/case-sort-within-records.sh new file mode 100644 index 000000000..722f12c27 --- /dev/null +++ b/c/reg_test/case-sort-within-records.sh @@ -0,0 +1 @@ +run_mlr sort-within-records $indir/sort-within-records.dkvp diff --git a/c/reg_test/expected/case-clean-whitespace.sh.out b/c/reg_test/expected/case-clean-whitespace.sh.out new file mode 100644 index 000000000..99badc41c --- /dev/null +++ b/c/reg_test/expected/case-clean-whitespace.sh.out @@ -0,0 +1,163 @@ + +mlr --icsv --ojson cat ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b ": 2, " c": 3 } +{ "n": 2, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 3, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 4, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 5, "a": "xy", "b ": 2, " c": 3 } +{ "n": 6, "a": " xy", "b ": 2, " c": 3 } +{ "n": 7, "a": " xy", "b ": 2, " c": 3 } +{ "n": 8, "a": " xy", "b ": 2, " c": 3 } +{ "n": 9, "a": "xy", "b ": 2, " c": 3 } +{ "n": 10, "a": " xy ", "b ": 2, " c": 3 } +{ "n": 11, "a": " xy ", "b ": 2, " c": 3 } +{ "n": 12, "a": " xy ", "b ": 2, " c": 3 } +{ "n": 13, "a": "", "b ": 2, " c": 3 } +{ "n": 14, "a": " ", "b ": 2, " c": 3 } +{ "n": 15, "a": " ", "b ": 2, " c": 3 } +{ "n": 16, "a": " ", "b ": 2, " c": 3 } + +mlr --icsv --ojson put $a = lstrip($a) ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b ": 2, " c": 3 } +{ "n": 2, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 3, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 4, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 5, "a": "xy", "b ": 2, " c": 3 } +{ "n": 6, "a": "xy", "b ": 2, " c": 3 } +{ "n": 7, "a": "xy", "b ": 2, " c": 3 } +{ "n": 8, "a": "xy", "b ": 2, " c": 3 } +{ "n": 9, "a": "xy", "b ": 2, " c": 3 } +{ "n": 10, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 11, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 12, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 13, "a": "", "b ": 2, " c": 3 } +{ "n": 14, "a": "", "b ": 2, " c": 3 } +{ "n": 15, "a": "", "b ": 2, " c": 3 } +{ "n": 16, "a": "", "b ": 2, " c": 3 } + +mlr --icsv --ojson put $a = rstrip($a) ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b ": 2, " c": 3 } +{ "n": 2, "a": "xy", "b ": 2, " c": 3 } +{ "n": 3, "a": "xy", "b ": 2, " c": 3 } +{ "n": 4, "a": "xy", "b ": 2, " c": 3 } +{ "n": 5, "a": "xy", "b ": 2, " c": 3 } +{ "n": 6, "a": " xy", "b ": 2, " c": 3 } +{ "n": 7, "a": " xy", "b ": 2, " c": 3 } +{ "n": 8, "a": " xy", "b ": 2, " c": 3 } +{ "n": 9, "a": "xy", "b ": 2, " c": 3 } +{ "n": 10, "a": " xy", "b ": 2, " c": 3 } +{ "n": 11, "a": " xy", "b ": 2, " c": 3 } +{ "n": 12, "a": " xy", "b ": 2, " c": 3 } +{ "n": 13, "a": "", "b ": 2, " c": 3 } +{ "n": 14, "a": "", "b ": 2, " c": 3 } +{ "n": 15, "a": "", "b ": 2, " c": 3 } +{ "n": 16, "a": "", "b ": 2, " c": 3 } + +mlr --icsv --ojson put $a = strip($a) ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b ": 2, " c": 3 } +{ "n": 2, "a": "xy", "b ": 2, " c": 3 } +{ "n": 3, "a": "xy", "b ": 2, " c": 3 } +{ "n": 4, "a": "xy", "b ": 2, " c": 3 } +{ "n": 5, "a": "xy", "b ": 2, " c": 3 } +{ "n": 6, "a": "xy", "b ": 2, " c": 3 } +{ "n": 7, "a": "xy", "b ": 2, " c": 3 } +{ "n": 8, "a": "xy", "b ": 2, " c": 3 } +{ "n": 9, "a": "xy", "b ": 2, " c": 3 } +{ "n": 10, "a": "xy", "b ": 2, " c": 3 } +{ "n": 11, "a": "xy", "b ": 2, " c": 3 } +{ "n": 12, "a": "xy", "b ": 2, " c": 3 } +{ "n": 13, "a": "", "b ": 2, " c": 3 } +{ "n": 14, "a": "", "b ": 2, " c": 3 } +{ "n": 15, "a": "", "b ": 2, " c": 3 } +{ "n": 16, "a": "", "b ": 2, " c": 3 } + +mlr --icsv --ojson put $a = collapse_whitespace($a) ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b ": 2, " c": 3 } +{ "n": 2, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 3, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 4, "a": "xy ", "b ": 2, " c": 3 } +{ "n": 5, "a": "xy", "b ": 2, " c": 3 } +{ "n": 6, "a": " xy", "b ": 2, " c": 3 } +{ "n": 7, "a": " xy", "b ": 2, " c": 3 } +{ "n": 8, "a": " xy", "b ": 2, " c": 3 } +{ "n": 9, "a": "xy", "b ": 2, " c": 3 } +{ "n": 10, "a": " xy ", "b ": 2, " c": 3 } +{ "n": 11, "a": " xy ", "b ": 2, " c": 3 } +{ "n": 12, "a": " xy ", "b ": 2, " c": 3 } +{ "n": 13, "a": "", "b ": 2, " c": 3 } +{ "n": 14, "a": " ", "b ": 2, " c": 3 } +{ "n": 15, "a": " ", "b ": 2, " c": 3 } +{ "n": 16, "a": " ", "b ": 2, " c": 3 } + +mlr --icsv --ojson put $a = clean_whitespace($a) ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b ": 2, " c": 3 } +{ "n": 2, "a": "xy", "b ": 2, " c": 3 } +{ "n": 3, "a": "xy", "b ": 2, " c": 3 } +{ "n": 4, "a": "xy", "b ": 2, " c": 3 } +{ "n": 5, "a": "xy", "b ": 2, " c": 3 } +{ "n": 6, "a": "xy", "b ": 2, " c": 3 } +{ "n": 7, "a": "xy", "b ": 2, " c": 3 } +{ "n": 8, "a": "xy", "b ": 2, " c": 3 } +{ "n": 9, "a": "xy", "b ": 2, " c": 3 } +{ "n": 10, "a": "xy", "b ": 2, " c": 3 } +{ "n": 11, "a": "xy", "b ": 2, " c": 3 } +{ "n": 12, "a": "xy", "b ": 2, " c": 3 } +{ "n": 13, "a": "", "b ": 2, " c": 3 } +{ "n": 14, "a": "", "b ": 2, " c": 3 } +{ "n": 15, "a": "", "b ": 2, " c": 3 } +{ "n": 16, "a": "", "b ": 2, " c": 3 } + +mlr --icsv --ojson clean-whitespace -k ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b": 2, "c": 3 } +{ "n": 2, "a": "xy ", "b": 2, "c": 3 } +{ "n": 3, "a": "xy ", "b": 2, "c": 3 } +{ "n": 4, "a": "xy ", "b": 2, "c": 3 } +{ "n": 5, "a": "xy", "b": 2, "c": 3 } +{ "n": 6, "a": " xy", "b": 2, "c": 3 } +{ "n": 7, "a": " xy", "b": 2, "c": 3 } +{ "n": 8, "a": " xy", "b": 2, "c": 3 } +{ "n": 9, "a": "xy", "b": 2, "c": 3 } +{ "n": 10, "a": " xy ", "b": 2, "c": 3 } +{ "n": 11, "a": " xy ", "b": 2, "c": 3 } +{ "n": 12, "a": " xy ", "b": 2, "c": 3 } +{ "n": 13, "a": "", "b": 2, "c": 3 } +{ "n": 14, "a": " ", "b": 2, "c": 3 } +{ "n": 15, "a": " ", "b": 2, "c": 3 } +{ "n": 16, "a": " ", "b": 2, "c": 3 } + +mlr --icsv --ojson clean-whitespace -v ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b ": 2, " c": 3 } +{ "n": 2, "a": "xy", "b ": 2, " c": 3 } +{ "n": 3, "a": "xy", "b ": 2, " c": 3 } +{ "n": 4, "a": "xy", "b ": 2, " c": 3 } +{ "n": 5, "a": "xy", "b ": 2, " c": 3 } +{ "n": 6, "a": "xy", "b ": 2, " c": 3 } +{ "n": 7, "a": "xy", "b ": 2, " c": 3 } +{ "n": 8, "a": "xy", "b ": 2, " c": 3 } +{ "n": 9, "a": "xy", "b ": 2, " c": 3 } +{ "n": 10, "a": "xy", "b ": 2, " c": 3 } +{ "n": 11, "a": "xy", "b ": 2, " c": 3 } +{ "n": 12, "a": "xy", "b ": 2, " c": 3 } +{ "n": 13, "a": "", "b ": 2, " c": 3 } +{ "n": 14, "a": "", "b ": 2, " c": 3 } +{ "n": 15, "a": "", "b ": 2, " c": 3 } +{ "n": 16, "a": "", "b ": 2, " c": 3 } + +mlr --icsv --ojson clean-whitespace ./reg_test/input/clean-whitespace.csv +{ "n": 1, "a": "xy", "b": 2, "c": 3 } +{ "n": 2, "a": "xy", "b": 2, "c": 3 } +{ "n": 3, "a": "xy", "b": 2, "c": 3 } +{ "n": 4, "a": "xy", "b": 2, "c": 3 } +{ "n": 5, "a": "xy", "b": 2, "c": 3 } +{ "n": 6, "a": "xy", "b": 2, "c": 3 } +{ "n": 7, "a": "xy", "b": 2, "c": 3 } +{ "n": 8, "a": "xy", "b": 2, "c": 3 } +{ "n": 9, "a": "xy", "b": 2, "c": 3 } +{ "n": 10, "a": "xy", "b": 2, "c": 3 } +{ "n": 11, "a": "xy", "b": 2, "c": 3 } +{ "n": 12, "a": "xy", "b": 2, "c": 3 } +{ "n": 13, "a": "", "b": 2, "c": 3 } +{ "n": 14, "a": "", "b": 2, "c": 3 } +{ "n": 15, "a": "", "b": 2, "c": 3 } +{ "n": 16, "a": "", "b": 2, "c": 3 } + diff --git a/c/reg_test/expected/case-format-values.sh.out b/c/reg_test/expected/case-format-values.sh.out new file mode 100644 index 000000000..3faa79a10 --- /dev/null +++ b/c/reg_test/expected/case-format-values.sh.out @@ -0,0 +1,49 @@ + +mlr format-values ./reg_test/input/abixy +a=pan,b=pan,i=1,x=0.346790,y=0.726803 +a=eks,b=pan,i=2,x=0.758680,y=0.522151 +a=wye,b=wye,i=3,x=0.204603,y=0.338319 +a=eks,b=wye,i=4,x=0.381399,y=0.134189 +a=wye,b=pan,i=5,x=0.573289,y=0.863624 +a=zee,b=pan,i=6,x=0.527126,y=0.493221 +a=eks,b=zee,i=7,x=0.611784,y=0.187885 +a=zee,b=wye,i=8,x=0.598554,y=0.976181 +a=hat,b=wye,i=9,x=0.031442,y=0.749551 +a=pan,b=wye,i=10,x=0.502626,y=0.952618 + +mlr format-values -n ./reg_test/input/abixy +a=pan,b=pan,i=1.000000,x=0.346790,y=0.726803 +a=eks,b=pan,i=2.000000,x=0.758680,y=0.522151 +a=wye,b=wye,i=3.000000,x=0.204603,y=0.338319 +a=eks,b=wye,i=4.000000,x=0.381399,y=0.134189 +a=wye,b=pan,i=5.000000,x=0.573289,y=0.863624 +a=zee,b=pan,i=6.000000,x=0.527126,y=0.493221 +a=eks,b=zee,i=7.000000,x=0.611784,y=0.187885 +a=zee,b=wye,i=8.000000,x=0.598554,y=0.976181 +a=hat,b=wye,i=9.000000,x=0.031442,y=0.749551 +a=pan,b=wye,i=10.000000,x=0.502626,y=0.952618 + +mlr format-values -i %08llx -f %.6le -s X%sX ./reg_test/input/abixy +a=XpanX,b=XpanX,i=00000001,x=3.467901e-01,y=7.268029e-01 +a=XeksX,b=XpanX,i=00000002,x=7.586800e-01,y=5.221511e-01 +a=XwyeX,b=XwyeX,i=00000003,x=2.046033e-01,y=3.383185e-01 +a=XeksX,b=XwyeX,i=00000004,x=3.813994e-01,y=1.341887e-01 +a=XwyeX,b=XpanX,i=00000005,x=5.732889e-01,y=8.636245e-01 +a=XzeeX,b=XpanX,i=00000006,x=5.271262e-01,y=4.932213e-01 +a=XeksX,b=XzeeX,i=00000007,x=6.117841e-01,y=1.878849e-01 +a=XzeeX,b=XwyeX,i=00000008,x=5.985540e-01,y=9.761814e-01 +a=XhatX,b=XwyeX,i=00000009,x=3.144188e-02,y=7.495508e-01 +a=XpanX,b=XwyeX,i=0000000a,x=5.026260e-01,y=9.526184e-01 + +mlr format-values -i %08llx -f %.6le -s X%sX -n ./reg_test/input/abixy +a=XpanX,b=XpanX,i=1.000000e+00,x=3.467901e-01,y=7.268029e-01 +a=XeksX,b=XpanX,i=2.000000e+00,x=7.586800e-01,y=5.221511e-01 +a=XwyeX,b=XwyeX,i=3.000000e+00,x=2.046033e-01,y=3.383185e-01 +a=XeksX,b=XwyeX,i=4.000000e+00,x=3.813994e-01,y=1.341887e-01 +a=XwyeX,b=XpanX,i=5.000000e+00,x=5.732889e-01,y=8.636245e-01 +a=XzeeX,b=XpanX,i=6.000000e+00,x=5.271262e-01,y=4.932213e-01 +a=XeksX,b=XzeeX,i=7.000000e+00,x=6.117841e-01,y=1.878849e-01 +a=XzeeX,b=XwyeX,i=8.000000e+00,x=5.985540e-01,y=9.761814e-01 +a=XhatX,b=XwyeX,i=9.000000e+00,x=3.144188e-02,y=7.495508e-01 +a=XpanX,b=XwyeX,i=1.000000e+01,x=5.026260e-01,y=9.526184e-01 + diff --git a/c/reg_test/expected/case-join-mixed-format.sh.out b/c/reg_test/expected/case-join-mixed-format.sh.out new file mode 100644 index 000000000..512f975c8 --- /dev/null +++ b/c/reg_test/expected/case-join-mixed-format.sh.out @@ -0,0 +1,324 @@ + +mlr --json join -s -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -s -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -s -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --json join -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --json join -s -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -s -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -s -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --json join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --json join -s -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -s -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -s -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --json join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --json join -s -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -s -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -s -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --json join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --dkvp join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --csvlite join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --ijson --ojson join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --idkvp --ojson join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.dkvp +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --icsvlite --ojson join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.csv +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --ijson --ojson join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --idkvp --ojson join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.dkvp +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --icsvlite --ojson join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.csv +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --ijson --ojson join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.json +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --idkvp --ojson join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.dkvp +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --icsvlite --ojson join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.csv +{ "x": 1, "a": 2, "b": 20 } +{ "x": 2, "a": 3, "b": 30 } +{ "x": 3, "a": 4, "b": 40 } +{ "x": 4, "a": 5, "b": 50 } + +mlr --ijson --odkvp join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.json +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --idkvp --odkvp join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --icsvlite --odkvp join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.csv +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --ijson --odkvp join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.json +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --idkvp --odkvp join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --icsvlite --odkvp join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.csv +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --ijson --odkvp join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.json +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --idkvp --odkvp join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.dkvp +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --icsvlite --odkvp join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.csv +x=1,a=2,b=20 +x=2,a=3,b=30 +x=3,a=4,b=40 +x=4,a=5,b=50 + +mlr --ijson --ocsvlite join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.json +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --idkvp --ocsvlite join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.dkvp +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --icsvlite --ocsvlite join -i csvlite -j x -f ./reg_test/input/multi-format-join-a.csv ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --ijson --ocsvlite join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.json +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --idkvp --ocsvlite join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.dkvp +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --icsvlite --ocsvlite join -i dkvp -j x -f ./reg_test/input/multi-format-join-a.dkvp ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --ijson --ocsvlite join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.json +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --idkvp --ocsvlite join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.dkvp +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + +mlr --icsvlite --ocsvlite join -i json -j x -f ./reg_test/input/multi-format-join-a.json ./reg_test/input/multi-format-join-b.csv +x,a,b +1,2,20 +2,3,30 +3,4,40 +4,5,50 + diff --git a/c/reg_test/expected/case-join-prepipe.sh.out b/c/reg_test/expected/case-join-prepipe.sh.out new file mode 100644 index 000000000..80d9307b4 --- /dev/null +++ b/c/reg_test/expected/case-join-prepipe.sh.out @@ -0,0 +1,31 @@ + +mlr --prepipe cat --odkvp join -j a -f ./reg_test/input/join-het.dkvp ./reg_test/input/abixy-het +a=pan,n=234,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,n=123,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,n=123,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,n=345,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729 +a=zee,n=456,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,n=123,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,n=456,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 +a=pan,n=234,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --odkvp join --prepipe cat -j a -f ./reg_test/input/join-het.dkvp ./reg_test/input/abixy-het +a=pan,n=234,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,n=123,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,n=123,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,n=345,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729 +a=zee,n=456,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,n=123,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,n=456,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 +a=pan,n=234,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --prepipe cat --odkvp join --prepipe cat -j a -f ./reg_test/input/join-het.dkvp ./reg_test/input/abixy-het +a=pan,n=234,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,n=123,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,n=123,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,n=345,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729 +a=zee,n=456,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,n=123,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,n=456,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 +a=pan,n=234,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + diff --git a/c/reg_test/expected/case-join.sh.out b/c/reg_test/expected/case-join.sh.out new file mode 100644 index 000000000..1d511e331 --- /dev/null +++ b/c/reg_test/expected/case-join.sh.out @@ -0,0 +1,1611 @@ + + +================================================================ +JOIN + +mlr --opprint join -s -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +mlr --opprint join -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +mlr --opprint join -s --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +l x +4 g + +mlr --opprint join --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +l x +4 g + +mlr --opprint join -s --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +r y +5 z + +mlr --opprint join --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +r y +5 z + +mlr --opprint join -s --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +l x +4 g + +r y +5 z + +mlr --opprint join --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +o x y +1 a s +2 b t +2 c t +2 d t +2 b v +2 c v +2 d v +3 e w +3 f w +3 e x +3 f x +3 e y +3 f y + +r y +5 z + +l x +4 g + +mlr --opprint join -s --np --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +l x +4 g + +mlr --opprint join --np --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +l x +4 g + +mlr --opprint join -s --np --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +5 z + +mlr --opprint join --np --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +5 z + +mlr --opprint join -s --np --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +l x +4 g + +r y +5 z + +mlr --opprint join --np --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +5 z + +l x +4 g + +mlr join -l l -r r -j j -f ./reg_test/input/joina.dkvp ./reg_test/input/joinb.dkvp +j=1,x=a,y=s +j=2,x=b,y=t +j=2,x=c,y=t +j=2,x=d,y=t +j=2,x=b,y=v +j=2,x=c,y=v +j=2,x=d,y=v +j=3,x=e,y=w +j=3,x=f,y=w +j=3,x=e,y=x +j=3,x=f,y=x +j=3,x=e,y=y +j=3,x=f,y=y + +mlr join -l l -j r -f ./reg_test/input/joina.dkvp ./reg_test/input/joinb.dkvp +r=1,x=a,y=s +r=2,x=b,y=t +r=2,x=c,y=t +r=2,x=d,y=t +r=2,x=b,y=v +r=2,x=c,y=v +r=2,x=d,y=v +r=3,x=e,y=w +r=3,x=f,y=w +r=3,x=e,y=x +r=3,x=f,y=x +r=3,x=e,y=y +r=3,x=f,y=y + +mlr join -r r -j l -f ./reg_test/input/joina.dkvp ./reg_test/input/joinb.dkvp +l=1,x=a,y=s +l=2,x=b,y=t +l=2,x=c,y=t +l=2,x=d,y=t +l=2,x=b,y=v +l=2,x=c,y=v +l=2,x=d,y=v +l=3,x=e,y=w +l=3,x=f,y=w +l=3,x=e,y=x +l=3,x=f,y=x +l=3,x=e,y=y +l=3,x=f,y=y + +mlr --opprint join -s -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp + +mlr --opprint join -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp + +mlr --opprint join -s --ul -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp + +mlr --opprint join --ul -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp + +mlr --opprint join -s --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join -s --ul --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join --ul --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join -s --np --ul -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp + +mlr --opprint join --np --ul -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp + +mlr --opprint join -s --np --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join --np --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join -s --np --ul --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join --np --ul --ur -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp +r y +1 s +2 t +2 v +3 w +3 x +3 y +5 z + +mlr --opprint join -s -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null + +mlr --opprint join -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null + +mlr --opprint join -s --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --opprint join --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --opprint join -s --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null + +mlr --opprint join --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null + +mlr --opprint join -s --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --opprint join --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --opprint join -s --np --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --opprint join --np --ul -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --opprint join -s --np --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null + +mlr --opprint join --np --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null + +mlr --opprint join -s --np --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --opprint join --np --ul --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null +l x +1 a +2 b +2 c +2 d +3 e +3 f +4 g + +mlr --odkvp join -j a -f ./reg_test/input/join-het.dkvp ./reg_test/input/abixy-het +a=pan,n=234,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,n=123,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,n=123,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,n=345,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729 +a=zee,n=456,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,n=123,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,n=456,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 +a=pan,n=234,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --odkvp join -j a -f ./reg_test/input/abixy-het ./reg_test/input/join-het.dkvp +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,n=123 +a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,n=123 +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,n=123 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,n=234 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,n=234 +a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,n=345 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,n=456 +a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,n=456 + +mlr --odkvp join --np --ul --ur -j a -f ./reg_test/input/join-het.dkvp ./reg_test/input/abixy-het +aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +aye=bee,enn=emm + +mlr --odkvp join --np --ul --ur -j a -f ./reg_test/input/abixy-het ./reg_test/input/join-het.dkvp +aye=bee,enn=emm +aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 + +mlr --idkvp --oxtab join --lp left_ --rp right_ -j i -f ./reg_test/input/abixy-het ./reg_test/input/abixy-het +i 1 +left_a pan +left_b pan +left_x 0.3467901443380824 +left_y 0.7268028627434533 +right_a pan +right_b pan +right_x 0.3467901443380824 +right_y 0.7268028627434533 + +i 2 +left_a eks +left_b pan +left_x 0.7586799647899636 +left_y 0.5221511083334797 +right_a eks +right_b pan +right_x 0.7586799647899636 +right_y 0.5221511083334797 + +i 3 +left_aaa wye +left_b wye +left_x 0.20460330576630303 +left_y 0.33831852551664776 +right_aaa wye +right_b wye +right_x 0.20460330576630303 +right_y 0.33831852551664776 + +i 4 +left_a eks +left_bbb wye +left_x 0.38139939387114097 +left_y 0.13418874328430463 +right_a eks +right_bbb wye +right_x 0.38139939387114097 +right_y 0.13418874328430463 + +i 5 +left_a wye +left_b pan +left_xxx 0.5732889198020006 +left_y 0.8636244699032729 +right_a wye +right_b pan +right_xxx 0.5732889198020006 +right_y 0.8636244699032729 + +i 6 +left_a zee +left_b pan +left_x 0.5271261600918548 +left_y 0.49322128674835697 +right_a zee +right_b pan +right_x 0.5271261600918548 +right_y 0.49322128674835697 + +i 8 +left_a zee +left_b wye +left_x 0.5985540091064224 +left_yyy 0.976181385699006 +right_a zee +right_b wye +right_x 0.5985540091064224 +right_yyy 0.976181385699006 + +i 9 +left_aaa hat +left_bbb wye +left_x 0.03144187646093577 +left_y 0.7495507603507059 +right_aaa hat +right_bbb wye +right_x 0.03144187646093577 +right_y 0.7495507603507059 + +i 10 +left_a pan +left_b wye +left_x 0.5026260055412137 +left_y 0.9526183602969864 +right_a pan +right_b wye +right_x 0.5026260055412137 +right_y 0.9526183602969864 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r1 +j=1,b=11 +j=1,b=12 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r11 +j=1,b=11 +j=1,b=12 +j=1,b=11 +j=1,b=12 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r12 +j=1,b=11 +j=1,b=12 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r13 +j=1,b=11 +j=1,b=12 +j=3,b=14 +j=3,b=15 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r14 +j=1,b=11 +j=1,b=12 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r15 +j=1,b=11 +j=1,b=12 +j=5,b=17 +j=5,b=18 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r16 +j=1,b=11 +j=1,b=12 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r2 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r22 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r23 +j=3,b=14 +j=3,b=15 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r24 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r25 +j=5,b=17 +j=5,b=18 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r26 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r3 +j=3,b=14 +j=3,b=15 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r33 +j=3,b=14 +j=3,b=15 +j=3,b=14 +j=3,b=15 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r34 +j=3,b=14 +j=3,b=15 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r35 +j=3,b=14 +j=3,b=15 +j=5,b=17 +j=5,b=18 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r36 +j=3,b=14 +j=3,b=15 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r4 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r44 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r45 +j=5,b=17 +j=5,b=18 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r46 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r5 +j=5,b=17 +j=5,b=18 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r55 +j=5,b=17 +j=5,b=18 +j=5,b=17 +j=5,b=18 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r56 +j=5,b=17 +j=5,b=18 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r6 + +mlr join -s -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r66 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r1 +x=100,b=10 +x=200,b=13 +l=3,b=14 +l=3,b=15 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r11 +x=100,b=10 +x=200,b=13 +l=3,b=14 +l=3,b=15 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r12 +x=100,b=10 +x=200,b=13 +x=300,b=16 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r13 +x=100,b=10 +x=200,b=13 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r14 +x=100,b=10 +x=200,b=13 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 +l=5,b=17 +l=5,b=18 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r15 +x=100,b=10 +x=200,b=13 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r16 +x=100,b=10 +x=200,b=13 +l=3,b=14 +l=3,b=15 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r2 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r22 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r23 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r24 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=3,b=14 +l=3,b=15 +x=400,b=19 +l=5,b=17 +l=5,b=18 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r25 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=3,b=14 +l=3,b=15 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r26 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r3 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r33 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r34 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +x=400,b=19 +l=5,b=17 +l=5,b=18 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r35 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r36 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r4 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 +l=5,b=17 +l=5,b=18 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r44 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 +l=5,b=17 +l=5,b=18 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r45 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r46 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 +l=5,b=17 +l=5,b=18 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r5 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r55 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r56 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r6 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r66 +x=100,b=10 +x=200,b=13 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=300,b=16 +l=5,b=17 +l=5,b=18 +x=400,b=19 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r1 +y=111 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r11 +y=111 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r12 +y=111 +y=222 +r=2 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r13 +y=111 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r14 +y=111 +y=222 +r=4 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r15 +y=111 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r16 +y=111 +y=222 +r=6 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r2 +y=111 +r=2 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r22 +y=111 +r=2 +y=222 +r=2 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r23 +y=111 +r=2 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r24 +y=111 +r=2 +y=222 +r=4 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r25 +y=111 +r=2 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r26 +y=111 +r=2 +y=222 +r=6 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r3 +y=111 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r33 +y=111 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r34 +y=111 +y=222 +r=4 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r35 +y=111 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r36 +y=111 +y=222 +r=6 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r4 +y=111 +r=4 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r44 +y=111 +r=4 +y=222 +r=4 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r45 +y=111 +r=4 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r46 +y=111 +r=4 +y=222 +r=6 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r5 +y=111 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r55 +y=111 +y=222 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r56 +y=111 +y=222 +r=6 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r6 +y=111 +r=6 +y=333 + +mlr join -s --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r66 +y=111 +r=6 +y=222 +r=6 +y=333 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r1 +j=1,b=11 +j=1,b=12 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r11 +j=1,b=11 +j=1,b=12 +j=1,b=11 +j=1,b=12 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r12 +j=1,b=11 +j=1,b=12 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r13 +j=1,b=11 +j=1,b=12 +j=3,b=14 +j=3,b=15 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r14 +j=1,b=11 +j=1,b=12 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r15 +j=1,b=11 +j=1,b=12 +j=5,b=17 +j=5,b=18 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r16 +j=1,b=11 +j=1,b=12 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r2 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r22 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r23 +j=3,b=14 +j=3,b=15 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r24 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r25 +j=5,b=17 +j=5,b=18 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r26 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r3 +j=3,b=14 +j=3,b=15 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r33 +j=3,b=14 +j=3,b=15 +j=3,b=14 +j=3,b=15 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r34 +j=3,b=14 +j=3,b=15 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r35 +j=3,b=14 +j=3,b=15 +j=5,b=17 +j=5,b=18 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r36 +j=3,b=14 +j=3,b=15 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r4 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r44 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r45 +j=5,b=17 +j=5,b=18 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r46 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r5 +j=5,b=17 +j=5,b=18 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r55 +j=5,b=17 +j=5,b=18 +j=5,b=17 +j=5,b=18 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r56 +j=5,b=17 +j=5,b=18 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r6 + +mlr join -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r66 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r1 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r11 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r13 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r14 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r15 +l=3,b=14 +l=3,b=15 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r16 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r2 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r22 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r23 +l=1,b=11 +l=1,b=12 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r24 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r25 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r26 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r3 +l=1,b=11 +l=1,b=12 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r33 +l=1,b=11 +l=1,b=12 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r34 +l=1,b=11 +l=1,b=12 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r35 +l=1,b=11 +l=1,b=12 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r36 +l=1,b=11 +l=1,b=12 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r4 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r44 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r45 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r46 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r5 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r55 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r56 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r6 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ul -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r66 +l=1,b=11 +l=1,b=12 +l=3,b=14 +l=3,b=15 +l=5,b=17 +l=5,b=18 +x=100,b=10 +x=200,b=13 +x=300,b=16 +x=400,b=19 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r1 +y=111 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r11 +y=111 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r12 +y=111 +y=222 +r=2 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r13 +y=111 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r14 +y=111 +y=222 +r=4 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r15 +y=111 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r16 +y=111 +y=222 +r=6 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r2 +y=111 +r=2 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r22 +y=111 +r=2 +y=222 +r=2 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r23 +y=111 +r=2 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r24 +y=111 +r=2 +y=222 +r=4 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r25 +y=111 +r=2 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r26 +y=111 +r=2 +y=222 +r=6 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r3 +y=111 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r33 +y=111 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r34 +y=111 +y=222 +r=4 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r35 +y=111 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r36 +y=111 +y=222 +r=6 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r4 +y=111 +r=4 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r44 +y=111 +r=4 +y=222 +r=4 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r45 +y=111 +r=4 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r46 +y=111 +r=4 +y=222 +r=6 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r5 +y=111 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r55 +y=111 +y=222 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r56 +y=111 +y=222 +r=6 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r6 +y=111 +r=6 +y=333 + +mlr join --np --ur -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r66 +y=111 +r=6 +y=222 +r=6 +y=333 + diff --git a/c/reg_test/expected/case-nest.sh.out b/c/reg_test/expected/case-nest.sh.out new file mode 100644 index 000000000..c544f1f2b --- /dev/null +++ b/c/reg_test/expected/case-nest.sh.out @@ -0,0 +1,97 @@ + +mlr cat ./reg_test/input/nest-explode.dkvp +x=a:1;b:2;c:3,y=d:40 +x=,y=d:50 +u=100,y=d:60 +x=a:4;b:5,y=d:70 + +mlr cat ./reg_test/input/nest-explode-vary-fs-ps.dkvp +x=a=1|b=2|c=3,y=d=40 +x=,y=d=50 +u=100,y=d=60 +x=a=4|b=5,y=d=70 + +mlr nest --explode --values --across-fields -f x ./reg_test/input/nest-explode.dkvp +x_1=a:1,x_2=b:2,x_3=c:3,y=d:40 +x_1=,y=d:50 +u=100,y=d:60 +x_1=a:4,x_2=b:5,y=d:70 + +mlr nest --explode --values --across-fields -f x --nested-fs pipe --nested-ps = ./reg_test/input/nest-explode-vary-fs-ps.dkvp +x_1=a=1,x_2=b=2,x_3=c=3,y=d=40 +x_1=,y=d=50 +u=100,y=d=60 +x_1=a=4,x_2=b=5,y=d=70 + +mlr nest --explode --values --across-fields -f x then nest --implode --values --across-fields -f x ./reg_test/input/nest-explode.dkvp +x=a:1;b:2;c:3,y=d:40 +x=,y=d:50 +u=100,y=d:60 +x=a:4;b:5,y=d:70 + +mlr nest --explode --values --across-fields -f x --nested-fs pipe --nested-ps = then nest --implode --values --across-fields -f x --nested-fs pipe --nested-ps = ./reg_test/input/nest-explode-vary-fs-ps.dkvp +x=a=1|b=2|c=3,y=d=40 +x=,y=d=50 +u=100,y=d=60 +x=a=4|b=5,y=d=70 + +mlr nest --explode --values --across-records -f x ./reg_test/input/nest-explode.dkvp +x=a:1,y=d:40 +x=b:2,y=d:40 +x=c:3,y=d:40 +x=,y=d:50 +u=100,y=d:60 +x=a:4,y=d:70 +x=b:5,y=d:70 + +mlr nest --explode --values --across-records -f x --nested-fs pipe --nested-ps = ./reg_test/input/nest-explode-vary-fs-ps.dkvp +x=a=1,y=d=40 +x=b=2,y=d=40 +x=c=3,y=d=40 +x=,y=d=50 +u=100,y=d=60 +x=a=4,y=d=70 +x=b=5,y=d=70 + +mlr nest --explode --values --across-records -f x then nest --implode --values --across-records -f x ./reg_test/input/nest-explode.dkvp +u=100,y=d:60 +x=a:1;b:2;c:3,y=d:40 +x=,y=d:50 +x=a:4;b:5,y=d:70 + +mlr nest --explode --values --across-records -f x --nested-fs pipe --nested-ps = then nest --implode --values --across-records -f x --nested-fs pipe --nested-ps = ./reg_test/input/nest-explode-vary-fs-ps.dkvp +u=100,y=d=60 +x=a=1|b=2|c=3,y=d=40 +x=,y=d=50 +x=a=4|b=5,y=d=70 + +mlr nest --explode --pairs --across-fields -f x ./reg_test/input/nest-explode.dkvp +a=1,b=2,c=3,y=d:40 +y=d:50 +u=100,y=d:60 +a=4,b=5,y=d:70 + +mlr nest --explode --pairs --across-fields -f x --nested-fs pipe --nested-ps = ./reg_test/input/nest-explode-vary-fs-ps.dkvp +a=1,b=2,c=3,y=d=40 +y=d=50 +u=100,y=d=60 +a=4,b=5,y=d=70 + +mlr nest --explode --pairs --across-records -f x ./reg_test/input/nest-explode.dkvp +a=1,y=d:40 +b=2,y=d:40 +c=3,y=d:40 +y=d:50 +u=100,y=d:60 +a=4,y=d:70 +b=5,y=d:70 + +mlr nest --explode --pairs --across-records -f x --nested-fs pipe --nested-ps = ./reg_test/input/nest-explode-vary-fs-ps.dkvp +a=1,y=d=40 +b=2,y=d=40 +c=3,y=d=40 +y=d=50 +u=100,y=d=60 +a=4,y=d=70 +b=5,y=d=70 + diff --git a/c/reg_test/expected/case-nothing.sh.out b/c/reg_test/expected/case-nothing.sh.out new file mode 100644 index 000000000..18af6ea7a --- /dev/null +++ b/c/reg_test/expected/case-nothing.sh.out @@ -0,0 +1,11 @@ + +mlr cat then nothing + +mlr cat then nothing ./reg_test/input/abixy + +mlr tac then nothing ./reg_test/input/abixy + +mlr cat then nothing ./reg_test/input/abixy ./reg_test/input/abixy + +mlr cat then nothing then cat ./reg_test/input/abixy + diff --git a/c/reg_test/expected/case-remove-empty-columns.sh.out b/c/reg_test/expected/case-remove-empty-columns.sh.out new file mode 100644 index 000000000..78af484a5 --- /dev/null +++ b/c/reg_test/expected/case-remove-empty-columns.sh.out @@ -0,0 +1,7 @@ + +mlr --csv remove-empty-columns ./reg_test/input/remove-empty-columns.csv +a,c,e +1,3,5 +2,4,5 +3,5,7 + diff --git a/c/reg_test/expected/case-repeat.sh.out b/c/reg_test/expected/case-repeat.sh.out new file mode 100644 index 000000000..a8a844079 --- /dev/null +++ b/c/reg_test/expected/case-repeat.sh.out @@ -0,0 +1,77 @@ + +mlr repeat -n 5 ./reg_test/input/repeat-input.dat +a=1,b=2,c=3 +a=1,b=2,c=3 +a=1,b=2,c=3 +a=1,b=2,c=3 +a=1,b=2,c=3 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 + +mlr repeat -f a ./reg_test/input/repeat-input.dat +a=1,b=2,c=3 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 + +mlr repeat -f b ./reg_test/input/repeat-input.dat +a=1,b=2,c=3 +a=1,b=2,c=3 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 + +mlr repeat -f c ./reg_test/input/repeat-input.dat +a=1,b=2,c=3 +a=1,b=2,c=3 +a=1,b=2,c=3 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=3,b=4,c=5 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=6,b=,c=7 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 +a=8,x=,c=9 + diff --git a/c/reg_test/expected/case-reshape.sh.out b/c/reg_test/expected/case-reshape.sh.out new file mode 100644 index 000000000..91b4b07fa --- /dev/null +++ b/c/reg_test/expected/case-reshape.sh.out @@ -0,0 +1,165 @@ + +mlr --pprint reshape -i X,Y,Z -o item,price ./reg_test/input/reshape-wide.tbl +time item price +2009-01-01 X 0.65473572 +2009-01-01 Y 2.4520609 +2009-01-01 Z -1.46570942 +2009-01-02 X -0.89248112 +2009-01-02 Y 0.2154713 +2009-01-02 Z -2.05357735 +2009-01-03 X 0.98012375 +2009-01-03 Y 1.3179287 +2009-01-03 Z 4.64248357 +2009-01-04 X 0.35397376 +2009-01-04 Y 3.3765645 +2009-01-04 Z -0.25237774 +2009-01-05 X 2.19357813 +2009-01-05 Y 1.3477511 +2009-01-05 Z 0.09719105 + +mlr --pprint reshape -i X,Z -o item,price ./reg_test/input/reshape-wide.tbl +time Y item price +2009-01-01 2.4520609 X 0.65473572 +2009-01-01 2.4520609 Z -1.46570942 +2009-01-02 0.2154713 X -0.89248112 +2009-01-02 0.2154713 Z -2.05357735 +2009-01-03 1.3179287 X 0.98012375 +2009-01-03 1.3179287 Z 4.64248357 +2009-01-04 3.3765645 X 0.35397376 +2009-01-04 3.3765645 Z -0.25237774 +2009-01-05 1.3477511 X 2.19357813 +2009-01-05 1.3477511 Z 0.09719105 + +mlr --pprint reshape -r [X-Z] -o item,price ./reg_test/input/reshape-wide.tbl +time item price +2009-01-01 X 0.65473572 +2009-01-01 Y 2.4520609 +2009-01-01 Z -1.46570942 +2009-01-02 X -0.89248112 +2009-01-02 Y 0.2154713 +2009-01-02 Z -2.05357735 +2009-01-03 X 0.98012375 +2009-01-03 Y 1.3179287 +2009-01-03 Z 4.64248357 +2009-01-04 X 0.35397376 +2009-01-04 Y 3.3765645 +2009-01-04 Z -0.25237774 +2009-01-05 X 2.19357813 +2009-01-05 Y 1.3477511 +2009-01-05 Z 0.09719105 + +mlr --pprint reshape -r [XZ] -o item,price ./reg_test/input/reshape-wide.tbl +time Y item price +2009-01-01 2.4520609 X 0.65473572 +2009-01-01 2.4520609 Z -1.46570942 +2009-01-02 0.2154713 X -0.89248112 +2009-01-02 0.2154713 Z -2.05357735 +2009-01-03 1.3179287 X 0.98012375 +2009-01-03 1.3179287 Z 4.64248357 +2009-01-04 3.3765645 X 0.35397376 +2009-01-04 3.3765645 Z -0.25237774 +2009-01-05 1.3477511 X 2.19357813 +2009-01-05 1.3477511 Z 0.09719105 + +mlr --pprint reshape -s item,price ./reg_test/input/reshape-long.tbl +time X Y Z +2009-01-01 0.65473572 2.4520609 -1.46570942 +2009-01-02 -0.89248112 0.2154713 -2.05357735 +2009-01-03 0.98012375 1.3179287 4.64248357 +2009-01-04 0.35397376 3.3765645 -0.25237774 +2009-01-05 2.19357813 1.3477511 0.09719105 + +mlr --pprint reshape -i X,Y,Z -o item,price then reshape -s item,price ./reg_test/input/reshape-wide.tbl +time X Y Z +2009-01-01 0.65473572 2.4520609 -1.46570942 +2009-01-02 -0.89248112 0.2154713 -2.05357735 +2009-01-03 0.98012375 1.3179287 4.64248357 +2009-01-04 0.35397376 3.3765645 -0.25237774 +2009-01-05 2.19357813 1.3477511 0.09719105 + +mlr --pprint reshape -s item,price then reshape -i X,Y,Z -o item,price ./reg_test/input/reshape-long.tbl +time item price +2009-01-01 X 0.65473572 +2009-01-01 Y 2.4520609 +2009-01-01 Z -1.46570942 +2009-01-02 X -0.89248112 +2009-01-02 Y 0.2154713 +2009-01-02 Z -2.05357735 +2009-01-03 X 0.98012375 +2009-01-03 Y 1.3179287 +2009-01-03 Z 4.64248357 +2009-01-04 X 0.35397376 +2009-01-04 Y 3.3765645 +2009-01-04 Z -0.25237774 +2009-01-05 X 2.19357813 +2009-01-05 Y 1.3477511 +2009-01-05 Z 0.09719105 + +mlr reshape -i X,Y,Z -o item,price ./reg_test/input/reshape-wide-ragged.dkvp +time=2009-01-01,item=X,price=0.65473572 +time=2009-01-01,item=Y,price=2.4520609 +time=2009-01-01,item=Z,price=-1.46570942 +time=2009-01-02,item=X,price=-0.89248112 +time=2009-01-02,item=Y,price=0.2154713 +time=2009-01-03,item=X,price=0.98012375 +time=2009-01-04 +time=2009-01-05,U=1.3477511,V=0.09719105,item=X,price=2.19357813 + +mlr reshape -i X,Z -o item,price ./reg_test/input/reshape-wide-ragged.dkvp +time=2009-01-01,Y=2.4520609,item=X,price=0.65473572 +time=2009-01-01,Y=2.4520609,item=Z,price=-1.46570942 +time=2009-01-02,Y=0.2154713,item=X,price=-0.89248112 +time=2009-01-03,item=X,price=0.98012375 +time=2009-01-04 +time=2009-01-05,U=1.3477511,V=0.09719105,item=X,price=2.19357813 + +mlr reshape -r [X-Z] -o item,price ./reg_test/input/reshape-wide-ragged.dkvp +time=2009-01-01,item=X,price=0.65473572 +time=2009-01-01,item=Y,price=2.4520609 +time=2009-01-01,item=Z,price=-1.46570942 +time=2009-01-02,item=X,price=-0.89248112 +time=2009-01-02,item=Y,price=0.2154713 +time=2009-01-03,item=X,price=0.98012375 +time=2009-01-04 +time=2009-01-05,U=1.3477511,V=0.09719105,item=X,price=2.19357813 + +mlr reshape -r [XZ] -o item,price ./reg_test/input/reshape-wide-ragged.dkvp +time=2009-01-01,Y=2.4520609,item=X,price=0.65473572 +time=2009-01-01,Y=2.4520609,item=Z,price=-1.46570942 +time=2009-01-02,Y=0.2154713,item=X,price=-0.89248112 +time=2009-01-03,item=X,price=0.98012375 +time=2009-01-04 +time=2009-01-05,U=1.3477511,V=0.09719105,item=X,price=2.19357813 + +mlr reshape -s item,price ./reg_test/input/reshape-long-ragged.dkvp +time=2009-01-01,item=X,value=0.65473572 +time=2009-01-01,item=Y,value=2.4520609 +time=2009-01-01,item=Z,value=-1.46570942 +time=2009-01-02,item=X,value=-0.89248112 +time=2009-01-02,item=Y,value=0.2154713 +time=2009-01-03,item=X,value=0.98012375 +time=2009-01-04 +time=2009-01-05,U=1.3477511,V=0.09719105,item=X,value=2.19357813 + +mlr --json reshape -i x,y -o item,value ./reg_test/input/small-non-nested.json +{ "a": "pan", "b": "pan", "i": 1, "item": "x", "value": 0.3467901443380824 } +{ "a": "pan", "b": "pan", "i": 1, "item": "y", "value": 0.7268028627434533 } +{ "a": "eks", "b": "pan", "i": 2, "item": "x", "value": 0.7586799647899636 } +{ "a": "eks", "b": "pan", "i": 2, "item": "y", "value": 0.5221511083334797 } +{ "a": "wye", "b": "wye", "i": 3, "item": "x", "value": 0.20460330576630303 } +{ "a": "wye", "b": "wye", "i": 3, "item": "y", "value": 0.33831852551664776 } +{ "a": "eks", "b": "wye", "i": 4, "item": "x", "value": 0.38139939387114097 } +{ "a": "eks", "b": "wye", "i": 4, "item": "y", "value": 0.13418874328430463 } +{ "a": "wye", "b": "pan", "i": 5, "item": "x", "value": 0.5732889198020006 } +{ "a": "wye", "b": "pan", "i": 5, "item": "y", "value": 0.8636244699032729 } +{ "a": "zee", "b": "pan", "i": 6, "item": "x", "value": 0.5271261600918548 } +{ "a": "zee", "b": "pan", "i": 6, "item": "y", "value": 0.49322128674835697 } +{ "a": "eks", "b": "zee", "i": 7, "item": "x", "value": 0.6117840605678454 } +{ "a": "eks", "b": "zee", "i": 7, "item": "y", "value": 0.1878849191181694 } +{ "a": "zee", "b": "wye", "i": 8, "item": "x", "value": 0.5985540091064224 } +{ "a": "zee", "b": "wye", "i": 8, "item": "y", "value": 0.976181385699006 } +{ "a": "hat", "b": "wye", "i": 9, "item": "x", "value": 0.03144187646093577 } +{ "a": "hat", "b": "wye", "i": 9, "item": "y", "value": 0.7495507603507059 } +{ "a": "pan", "b": "wye", "i": 10, "item": "x", "value": 0.5026260055412137 } +{ "a": "pan", "b": "wye", "i": 10, "item": "y", "value": 0.9526183602969864 } + diff --git a/c/reg_test/expected/case-skip-trivial-records.sh.out b/c/reg_test/expected/case-skip-trivial-records.sh.out new file mode 100644 index 000000000..0ddb3779f --- /dev/null +++ b/c/reg_test/expected/case-skip-trivial-records.sh.out @@ -0,0 +1,7 @@ + +mlr --csv skip-trivial-records ./reg_test/input/trivial-records.csv +a,b,c +1,2,3 +4,,6 +,8,9 + diff --git a/c/reg_test/expected/case-sort-within-records.sh.out b/c/reg_test/expected/case-sort-within-records.sh.out new file mode 100644 index 000000000..652034bf1 --- /dev/null +++ b/c/reg_test/expected/case-sort-within-records.sh.out @@ -0,0 +1,13 @@ + +mlr sort-within-records ./reg_test/input/sort-within-records.dkvp +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 +