
================================================================
STATELESS MAPPERS

mlr cat ./reg_test/input/abixy
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

mlr cat /dev/null

mlr cat -n ./reg_test/input/abixy
n=0,a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
n=1,a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
n=2,a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
n=3,a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
n=4,a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
n=5,a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
n=6,a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
n=7,a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
n=8,a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
n=9,a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr cat -N counter ./reg_test/input/abixy
counter=0,a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
counter=1,a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
counter=2,a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
counter=3,a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
counter=4,a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
counter=5,a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
counter=6,a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
counter=7,a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
counter=8,a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
counter=9,a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr cut -f a,x ./reg_test/input/abixy
a=pan,x=0.3467901443380824
a=eks,x=0.7586799647899636
a=wye,x=0.20460330576630303
a=eks,x=0.38139939387114097
a=wye,x=0.5732889198020006
a=zee,x=0.5271261600918548
a=eks,x=0.6117840605678454
a=zee,x=0.5985540091064224
a=hat,x=0.03144187646093577
a=pan,x=0.5026260055412137

mlr cut --complement -f a,x ./reg_test/input/abixy
b=pan,i=1,y=0.7268028627434533
b=pan,i=2,y=0.5221511083334797
b=wye,i=3,y=0.33831852551664776
b=wye,i=4,y=0.13418874328430463
b=pan,i=5,y=0.8636244699032729
b=pan,i=6,y=0.49322128674835697
b=zee,i=7,y=0.1878849191181694
b=wye,i=8,y=0.976181385699006
b=wye,i=9,y=0.7495507603507059
b=wye,i=10,y=0.9526183602969864

mlr cut -r -f c,e ./reg_test/input/having-fields-regex.dkvp
abc=1,def=11

abcd=3

abcde=5


mlr cut -r -f "C","E" ./reg_test/input/having-fields-regex.dkvp

ABC=2,DEF=12

ABCD=4

ABCDE=6

mlr cut -r -f "c"i,"e" ./reg_test/input/having-fields-regex.dkvp
abc=1,def=11
ABC=2
abcd=3
ABCD=4
abcde=5
ABCDE=6

mlr cut -r -f "C"i,"E" ./reg_test/input/having-fields-regex.dkvp
abc=1
ABC=2,DEF=12
abcd=3
ABCD=4
abcde=5
ABCDE=6

mlr cut -r -x -f c,e ./reg_test/input/having-fields-regex.dkvp

ABC=2,DEF=12
ghi=13
ABCD=4,GHI=14
ghi=15
ABCDE=6,GHI=16

mlr cut -r -x -f "C","E" ./reg_test/input/having-fields-regex.dkvp
abc=1,def=11

abcd=3,ghi=13
GHI=14
abcde=5,ghi=15
GHI=16

mlr cut -r -x -f "C","E"i ./reg_test/input/having-fields-regex.dkvp
abc=1

abcd=3,ghi=13
GHI=14
ghi=15
GHI=16

mlr cut -r -x -f "c","e"i ./reg_test/input/having-fields-regex.dkvp

ABC=2
ghi=13
ABCD=4,GHI=14
ghi=15
GHI=16

mlr --csvlite cut -r -f ^Name$,^Date_[0-9].*$ ./reg_test/input/date1.csv ./reg_test/input/date2.csv
Name,Date_201505
Alice,2015-05-14
Bob,2015-05-11
Chuck,2015-05-28
Denise,2015-05-02

Name,Date_201506
Alice,2015-06-23
Denise,2015-06-17
Chuck,2015-06-19
Bob,2015-06-19

mlr having-fields --at-least a,b ./reg_test/input/abixy
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

mlr having-fields --at-least a,c ./reg_test/input/abixy

mlr having-fields --at-least a,b,i,x,y ./reg_test/input/abixy
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

mlr having-fields --which-are a,b,i,x ./reg_test/input/abixy

mlr having-fields --which-are a,b,i,x,y ./reg_test/input/abixy
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

mlr having-fields --which-are a,b,i,y,x ./reg_test/input/abixy
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

mlr having-fields --which-are a,b,i,x,w ./reg_test/input/abixy

mlr having-fields --which-are a,b,i,x,y,z ./reg_test/input/abixy

mlr having-fields --at-most a,c ./reg_test/input/abixy

mlr having-fields --at-most a,b,i,x,y ./reg_test/input/abixy
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

mlr having-fields --at-most a,b,i,x,y,z ./reg_test/input/abixy
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

mlr having-fields --all-matching "^[a-z][a-z][a-z]$" ./reg_test/input/having-fields-regex.dkvp
abc=1,def=11

mlr having-fields --any-matching "^[a-z][a-z][a-z]$" ./reg_test/input/having-fields-regex.dkvp
abc=1,def=11
abcd=3,ghi=13
abcde=5,ghi=15

mlr having-fields --none-matching "^[a-z][a-z][a-z]$" ./reg_test/input/having-fields-regex.dkvp
ABC=2,DEF=12
ABCD=4,GHI=14
ABCDE=6,GHI=16

mlr having-fields --all-matching "^[a-z][a-z][a-z]$"i ./reg_test/input/having-fields-regex.dkvp
abc=1,def=11
ABC=2,DEF=12

mlr having-fields --any-matching "^[a-z][a-z][a-z]$"i ./reg_test/input/having-fields-regex.dkvp
abc=1,def=11
ABC=2,DEF=12
abcd=3,ghi=13
ABCD=4,GHI=14
abcde=5,ghi=15
ABCDE=6,GHI=16

mlr having-fields --none-matching "^[a-z][a-z][a-z]$"i ./reg_test/input/having-fields-regex.dkvp

mlr rename b,BEE,x,EKS ./reg_test/input/abixy
a=pan,BEE=pan,i=1,EKS=0.3467901443380824,y=0.7268028627434533
a=eks,BEE=pan,i=2,EKS=0.7586799647899636,y=0.5221511083334797
a=wye,BEE=wye,i=3,EKS=0.20460330576630303,y=0.33831852551664776
a=eks,BEE=wye,i=4,EKS=0.38139939387114097,y=0.13418874328430463
a=wye,BEE=pan,i=5,EKS=0.5732889198020006,y=0.8636244699032729
a=zee,BEE=pan,i=6,EKS=0.5271261600918548,y=0.49322128674835697
a=eks,BEE=zee,i=7,EKS=0.6117840605678454,y=0.1878849191181694
a=zee,BEE=wye,i=8,EKS=0.5985540091064224,y=0.976181385699006
a=hat,BEE=wye,i=9,EKS=0.03144187646093577,y=0.7495507603507059
a=pan,BEE=wye,i=10,EKS=0.5026260055412137,y=0.9526183602969864

mlr rename nonesuch,nonesuch,x,EKS ./reg_test/input/abixy
a=pan,b=pan,i=1,EKS=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,EKS=0.7586799647899636,y=0.5221511083334797
a=wye,b=wye,i=3,EKS=0.20460330576630303,y=0.33831852551664776
a=eks,b=wye,i=4,EKS=0.38139939387114097,y=0.13418874328430463
a=wye,b=pan,i=5,EKS=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,EKS=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,i=7,EKS=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,EKS=0.5985540091064224,y=0.976181385699006
a=hat,b=wye,i=9,EKS=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,EKS=0.5026260055412137,y=0.9526183602969864

mlr --csvlite rename -r ^Date_[0-9].*$,Date ./reg_test/input/date1.csv ./reg_test/input/date2.csv
Name,Date,Extraneous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr --csvlite rename -r (.*)e(.*),\1EEE\2 ./reg_test/input/date1.csv ./reg_test/input/date2.csv
NamEEE,DatEEE_201505,ExtranEEEous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep

NamEEE,DatEEE_201506,ExtranEEEous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr --csvlite rename -r "(.*)e(.*)"i,\1EEE\2 ./reg_test/input/date1.csv ./reg_test/input/date2.csv
NamEEE,DatEEE_201505,ExtranEEEous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep

NamEEE,DatEEE_201506,ExtranEEEous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr --csvlite rename -r -g "(.*)e(.*)"i,\1EEE\2 ./reg_test/input/date1.csv ./reg_test/input/date2.csv
NamEEE,DatEEE_201505,ExtranEEEous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep

NamEEE,DatEEE_201506,ExtranEEEous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr --csvlite rename -r "e",EEE ./reg_test/input/date1.csv ./reg_test/input/date2.csv
NamEEE,DatEEE_201505,ExtranEEEous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep

NamEEE,DatEEE_201506,ExtranEEEous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr --csvlite rename -r -g "e",EEE ./reg_test/input/date1.csv ./reg_test/input/date2.csv
NamEEE,DatEEE_201505,ExtranEEEous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep

NamEEE,DatEEE_201506,ExtranEEEous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr --csvlite rename -r "e"i,EEE ./reg_test/input/date1.csv ./reg_test/input/date2.csv
NamEEE,DatEEE_201505,EEExtraneous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep

NamEEE,DatEEE_201506,EEExtraneous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr --csvlite rename -r -g "e"i,EEE ./reg_test/input/date1.csv ./reg_test/input/date2.csv
NamEEE,DatEEE_201505,EEExtranEEEous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep

NamEEE,DatEEE_201506,EEExtranEEEous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d

mlr regularize ./reg_test/input/regularize.dkvp
a=1,c=2,b=3
e=4,d=5
a=6,c=7,b=8

mlr --opprint bar -f x,y --lo 0 --hi 1 ./reg_test/input/abixy
a   b   i  x                                        y
pan pan 1  *************........................... *****************************...........
eks pan 2  ******************************.......... ********************....................
wye wye 3  ********................................ *************...........................
eks wye 4  ***************......................... *****...................................
wye pan 5  **********************.................. **********************************......
zee pan 6  *********************................... *******************.....................
eks zee 7  ************************................ *******.................................
zee wye 8  ***********************................. ***************************************.
hat wye 9  *....................................... *****************************...........
pan wye 10 ********************.................... **************************************..

mlr --opprint bar -f x,y -c c -x x -b b --lo 0.1 --hi 0.9 -w 20 ./reg_test/input/abixy
a   b   i  x                    y
pan pan 1  ccccccbbbbbbbbbbbbbb cccccccccccccccbbbbb
eks pan 2  ccccccccccccccccbbbb ccccccccccbbbbbbbbbb
wye wye 3  ccbbbbbbbbbbbbbbbbbb cccccbbbbbbbbbbbbbbb
eks wye 4  cccccccbbbbbbbbbbbbb xbbbbbbbbbbbbbbbbbbb
wye pan 5  cccccccccccbbbbbbbbb cccccccccccccccccccb
zee pan 6  ccccccccccbbbbbbbbbb cccccccccbbbbbbbbbbb
eks zee 7  ccccccccccccbbbbbbbb ccbbbbbbbbbbbbbbbbbb
zee wye 8  ccccccccccccbbbbbbbb cccccccccccccccccccx
hat wye 9  xbbbbbbbbbbbbbbbbbbb ccccccccccccccccbbbb
pan wye 10 ccccccccccbbbbbbbbbb cccccccccccccccccccx

mlr --opprint bar --auto -f x,y -w 10 reg_test/input/abixy
a   b   i  x                              y
pan pan 1  [0.0314419]****......[0.75868] [0.134189]*******...[0.976181]
eks pan 2  [0.0314419]*********#[0.75868] [0.134189]****......[0.976181]
wye wye 3  [0.0314419]**........[0.75868] [0.134189]**........[0.976181]
eks wye 4  [0.0314419]****......[0.75868] [0.134189]#.........[0.976181]
wye pan 5  [0.0314419]*******...[0.75868] [0.134189]********..[0.976181]
zee pan 6  [0.0314419]******....[0.75868] [0.134189]****......[0.976181]
eks zee 7  [0.0314419]*******...[0.75868] [0.134189]#.........[0.976181]
zee wye 8  [0.0314419]*******...[0.75868] [0.134189]*********#[0.976181]
hat wye 9  [0.0314419]#.........[0.75868] [0.134189]*******...[0.976181]
pan wye 10 [0.0314419]******....[0.75868] [0.134189]*********.[0.976181]


================================================================
TRIVIAL RETAINERS

mlr group-by a ./reg_test/input/abixy
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
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=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr group-by a,b ./reg_test/input/abixy
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

mlr group-like ./reg_test/input/het.dkvp
host=jupiter
host=saturn
host=mars
host=jupiter
host=mars
host=saturn
df/tmp=2.43MB,uptime=32345sec
df/tmp=1.34MB,uptime=234214132sec
df/tmp=4.97MB,uptime=345089805sec
df/tmp=0.04MB,uptime=890sec
df/tmp=8.55MB,uptime=787897777sec
df/tmp=9.47MB,uptime=234289080sec

mlr tac ./reg_test/input/abixy
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533

mlr tac /dev/null


================================================================
HEAD/TAIL/ETC.

mlr head -n 2 ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797

mlr head -n 2 -g a ./reg_test/input/abixy-het
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=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr head -n 2 -g a,b ./reg_test/input/abixy-het
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=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr tail -n 2 ./reg_test/input/abixy-het
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr tail -n 2 -g a ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006

mlr tail -n 2 -g a,b ./reg_test/input/abixy-het
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=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr top -f x,y -n 2 ./reg_test/input/abixy-het
top_idx=1,x_top=0.758680,y_top=0.952618
top_idx=2,x_top=0.611784,y_top=0.749551

mlr top -f x,y -n 2 -g a ./reg_test/input/abixy-het
a=pan,top_idx=1,x_top=0.502626,y_top=0.952618
a=pan,top_idx=2,x_top=0.346790,y_top=0.726803
a=eks,top_idx=1,x_top=0.758680,y_top=0.522151
a=eks,top_idx=2,x_top=0.611784,y_top=0.187885
a=zee,top_idx=1,x_top=0.527126,y_top=0.493221
a=zee,top_idx=2,x_top=,y_top=

mlr top -f x,y -n 2 -g a,b ./reg_test/input/abixy-het
a=pan,b=pan,top_idx=1,x_top=0.346790,y_top=0.726803
a=pan,b=pan,top_idx=2,x_top=,y_top=
a=eks,b=pan,top_idx=1,x_top=0.758680,y_top=0.522151
a=eks,b=pan,top_idx=2,x_top=,y_top=
a=zee,b=pan,top_idx=1,x_top=0.527126,y_top=0.493221
a=zee,b=pan,top_idx=2,x_top=,y_top=
a=eks,b=zee,top_idx=1,x_top=0.611784,y_top=0.187885
a=eks,b=zee,top_idx=2,x_top=,y_top=
a=pan,b=wye,top_idx=1,x_top=0.502626,y_top=0.952618
a=pan,b=wye,top_idx=2,x_top=,y_top=

mlr --seed 12345 sample -k 2 ./reg_test/input/abixy-het
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797

mlr --seed 12345 sample -k 2 -g a ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006

mlr --seed 12345 sample -k 2 -g a,b ./reg_test/input/abixy-het
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=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr uniq -g a ./reg_test/input/abixy-het
a=pan
a=eks
a=wye
a=zee

mlr uniq -g a,b ./reg_test/input/abixy-het
a=pan,b=pan
a=eks,b=pan
a=wye,b=pan
a=zee,b=pan
a=eks,b=zee
a=zee,b=wye
a=pan,b=wye

mlr uniq -c -g a ./reg_test/input/abixy-het
a=pan,count=2
a=eks,count=3
a=wye,count=1
a=zee,count=2

mlr uniq -c -g a,b ./reg_test/input/abixy-het
a=pan,b=pan,count=1
a=eks,b=pan,count=1
a=wye,b=pan,count=1
a=zee,b=pan,count=1
a=eks,b=zee,count=1
a=zee,b=wye,count=1
a=pan,b=wye,count=1

mlr count-distinct -f a ./reg_test/input/small ./reg_test/input/abixy
a=pan,count=4
a=eks,count=6
a=wye,count=4
a=zee,count=4
a=hat,count=2

mlr count-distinct -f a,b ./reg_test/input/small ./reg_test/input/abixy
a=pan,b=pan,count=2
a=eks,b=pan,count=2
a=wye,b=wye,count=2
a=eks,b=wye,count=2
a=wye,b=pan,count=2
a=zee,b=pan,count=2
a=eks,b=zee,count=2
a=zee,b=wye,count=2
a=hat,b=wye,count=2
a=pan,b=wye,count=2

mlr grep pan ./reg_test/input/abixy-het
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=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr grep -v pan ./reg_test/input/abixy-het
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059


================================================================
SORT

mlr sort -f a ./reg_test/input/abixy
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
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=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006

mlr sort -r a ./reg_test/input/abixy
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694

mlr sort -f x ./reg_test/input/abixy
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797

mlr sort -r x ./reg_test/input/abixy
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
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=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr sort -nf x ./reg_test/input/abixy
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797

mlr sort -nr x ./reg_test/input/abixy
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
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=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr sort -f a,b ./reg_test/input/abixy
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006

mlr sort -r a,b ./reg_test/input/abixy
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797

mlr sort -f x,y ./reg_test/input/abixy
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797

mlr sort -r x,y ./reg_test/input/abixy
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
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=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr sort -nf x,y ./reg_test/input/abixy
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797

mlr sort -nr x,y ./reg_test/input/abixy
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
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=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr sort -f a -nr x ./reg_test/input/abixy
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697

mlr sort -nr y -f a ./reg_test/input/abixy
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
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=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463

mlr sort -f a -r b -nf x -nr y ./reg_test/input/abixy
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697

mlr sort -f x ./reg_test/input/sort-het.dkvp
x=1
x=2
x=4
a=3

mlr sort -r x ./reg_test/input/sort-het.dkvp
x=4
x=2
x=1
a=3


================================================================
TOP

mlr top -n 4 -f x ./reg_test/input/abixy-wide
top_idx=1,x_top=0.999730
top_idx=2,x_top=0.999308
top_idx=3,x_top=0.997339
top_idx=4,x_top=0.997245

mlr top -n 1 -f x,y ./reg_test/input/abixy-wide
top_idx=1,x_top=0.999730,y_top=0.999522

mlr top -n 4 -f x -g a ./reg_test/input/abixy-wide
a=cat,top_idx=1,x_top=0.996359
a=cat,top_idx=2,x_top=0.990588
a=cat,top_idx=3,x_top=0.990160
a=cat,top_idx=4,x_top=0.986548
a=pan,top_idx=1,x_top=0.999730
a=pan,top_idx=2,x_top=0.999308
a=pan,top_idx=3,x_top=0.996583
a=pan,top_idx=4,x_top=0.990853
a=wye,top_idx=1,x_top=0.997339
a=wye,top_idx=2,x_top=0.996525
a=wye,top_idx=3,x_top=0.995414
a=wye,top_idx=4,x_top=0.994219
a=dog,top_idx=1,x_top=0.997245
a=dog,top_idx=2,x_top=0.988581
a=dog,top_idx=3,x_top=0.980266
a=dog,top_idx=4,x_top=0.977280
a=hat,top_idx=1,x_top=0.997014
a=hat,top_idx=2,x_top=0.995705
a=hat,top_idx=3,x_top=0.992879
a=hat,top_idx=4,x_top=0.989639

mlr top -n 1 -f x,y -g a ./reg_test/input/abixy-wide
a=cat,top_idx=1,x_top=0.996359,y_top=0.997929
a=pan,top_idx=1,x_top=0.999730,y_top=0.999319
a=wye,top_idx=1,x_top=0.997339,y_top=0.999450
a=dog,top_idx=1,x_top=0.997245,y_top=0.999522
a=hat,top_idx=1,x_top=0.997014,y_top=0.991400

mlr top -a -n 4 -f x ./reg_test/input/abixy-wide
a=pan,b=cat,i=1943,x=0.9997301774748071,y=0.8408385083267972,x2=0.9994604277538093,xy=0.8406116311572011,y2=0.7070093970852334
a=pan,b=dog,i=552,x=0.9993077485337599,y=0.10019859749555626,x2=0.9986159762796124,xy=0.10012923486952477,y2=0.010039758940076493
a=wye,b=pan,i=568,x=0.9973387930844961,y=0.5711453274816489,x2=0.9946846681912394,xy=0.569625391586397,y2=0.32620698510412
a=dog,b=pan,i=1613,x=0.997245171384539,y=0.8188847898688517,x2=0.9944979318497786,xy=0.8166289026169553,y2=0.6705722990785534

mlr top -a -n 4 -f x -g a ./reg_test/input/abixy-wide
a=cat,b=dog,i=901,x=0.9963591865818606,y=0.9423606044154952,x2=0.9927316286860669,xy=0.9389296452822133,y2=0.8880435087543374
a=cat,b=wye,i=135,x=0.9905881531288986,y=0.7789092765450115,x2=0.9812648891193222,xy=0.7715783017076895,y2=0.6066996610878732
a=cat,b=hat,i=975,x=0.9901595235021967,y=0.8592860989306361,x2=0.9804158819820973,xy=0.8508303142692202,y2=0.738372599815431
a=cat,b=dog,i=748,x=0.986548192318023,y=0.22327955924073406,x2=0.973277335765959,xy=0.2202760455505111,y2=0.04985376157473647
a=pan,b=cat,i=1943,x=0.9997301774748071,y=0.8408385083267972,x2=0.9994604277538093,xy=0.8406116311572011,y2=0.7070093970852334
a=pan,b=dog,i=552,x=0.9993077485337599,y=0.10019859749555626,x2=0.9986159762796124,xy=0.10012923486952477,y2=0.010039758940076493
a=pan,b=pan,i=756,x=0.9965826588776338,y=0.8864833103309704,x2=0.9931769959756142,xy=0.883453894460285,y2=0.7858526594953555
a=pan,b=wye,i=1876,x=0.9908531016291003,y=0.318873165751998,x2=0.9817898690080082,xy=0.3159564653116574,y2=0.10168009583670118
a=wye,b=pan,i=568,x=0.9973387930844961,y=0.5711453274816489,x2=0.9946846681912394,xy=0.569625391586397,y2=0.32620698510412
a=wye,b=dog,i=1772,x=0.9965249307670624,y=0.8078766237661098,x2=0.9930619376402985,xy=0.8050691965668507,y2=0.6526646392277285
a=wye,b=pan,i=450,x=0.9954136776717515,y=0.8564839236024028,x2=0.9908483896960015,xy=0.8525558122597992,y2=0.7335647113893665
a=wye,b=dog,i=882,x=0.9942189496990836,y=0.3298671968153588,x2=0.988471319940749,xy=0.32796021795794694,y2=0.10881236753482267
a=dog,b=pan,i=1613,x=0.997245171384539,y=0.8188847898688517,x2=0.9944979318497786,xy=0.8166289026169553,y2=0.6705722990785534
a=dog,b=hat,i=1680,x=0.9885812365291148,y=0.048768165346359305,x2=0.9772928612174336,xy=0.04821129320136021,y2=0.0023783339512498405
a=dog,b=wye,i=1331,x=0.9802656048578349,y=0.9431768957041479,x2=0.9609206560672968,xy=0.9245638701553616,y2=0.889582656590113
a=dog,b=pan,i=978,x=0.9772797759762182,y=0.5328687567382687,x2=0.9550757605321272,xy=0.5207618592099011,y2=0.2839491119077882
a=hat,b=dog,i=1894,x=0.9970136511026203,y=0.2054109087831395,x2=0.9940362204849775,xy=0.2047974801421852,y2=0.04219364144711526
a=hat,b=hat,i=818,x=0.9957052214494239,y=0.026702922142899044,x2=0.9914288880216462,xy=0.026588239005642018,y2=0.0007130460509697281
a=hat,b=hat,i=1513,x=0.9928788688650781,y=0.1805357299725343,x2=0.9858084482387971,xy=0.17925011136486105,y2=0.03259314979671582
a=hat,b=dog,i=1768,x=0.9896393441122658,y=0.5323182982465756,x2=0.9793860314149557,xy=0.5268031315356986,y2=0.2833627706481302


================================================================
JOIN

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 -u -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 --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 -u --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 --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 -u --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 --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 -u --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 --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 -u --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 --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 -u --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 --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 -u --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 --opprint join -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp

mlr --opprint join -u -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 -u --ul -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp

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 -u --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 -u --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 -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp

mlr --opprint join -u --np --ul -f /dev/null -l l -r r -j o ./reg_test/input/joinb.dkvp

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 -u --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 --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 -u --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 -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null

mlr --opprint join -u -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null

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 -u --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 --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null

mlr --opprint join -u --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null

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 -u --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 -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 -u --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 --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null

mlr --opprint join -u --np --ur -f ./reg_test/input/joina.dkvp -l l -r r -j o /dev/null

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 --opprint join -u --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 -u -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 -u -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 -u --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 -u --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 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
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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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 --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

mlr join -u -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 -u -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 -u -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 -u -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 -u -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 -u -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 -u -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 -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r2

mlr join -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r22

mlr join -u -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 -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r24

mlr join -u -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 -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r26

mlr join -u -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 -u -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 -u -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 -u -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 -u -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 -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r4

mlr join -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r44

mlr join -u -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 -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r46

mlr join -u -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 -u -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 -u -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 -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r6

mlr join -u -l l -r r -j j -f ./reg_test/input/het-join-left ./reg_test/input/het-join-right-r66

mlr join -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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 -u --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


================================================================
STATS

mlr --opprint stats1 -a mean,sum,count,min,max,mode -f i,x,y ./reg_test/input/abixy
i_mean   i_sum i_count i_min i_max i_mode x_mean   x_sum    x_count x_min    x_max    x_mode             y_mean   y_sum    y_count y_min    y_max    y_mode
5.500000 55    10      1     1     1      0.453629 4.536294 10      0.031442 0.031442 0.3467901443380824 0.594454 5.944542 10      0.134189 0.134189 0.7268028627434533

mlr --opprint stats1 -a min,p10,p50,mode,p90,max -f i,x,y ./reg_test/input/abixy
i_min i_p10    i_p50    i_mode i_p90     i_max x_min    x_p10    x_p50    x_mode             x_p90    x_max    y_min    y_p10    y_p50    y_mode             y_p90    y_max
1     2.000000 6.000000 1      10.000000 1     0.031442 0.204603 0.527126 0.3467901443380824 0.758680 0.031442 0.134189 0.187885 0.726803 0.7268028627434533 0.976181 0.134189

mlr --opprint stats1 -a mean,meaneb,stddev -f i,x,y ./reg_test/input/abixy
i_mean   i_meaneb i_stddev x_mean   x_meaneb x_stddev y_mean   y_meaneb y_stddev
5.500000 0.957427 3.027650 0.453629 0.068157 0.215531 0.594454 0.096968 0.306639

mlr --oxtab stats1 -s -a mean,sum,count,min,max,mode -f i,x,y ./reg_test/input/abixy
a       pan
b       pan
i       1
x       0.3467901443380824
y       0.7268028627434533
i_mean  1.000000
i_sum   1
i_count 1
i_min   1
i_max   1
i_mode  1
x_mean  0.346790
x_sum   0.346790
x_count 1
x_min   0.346790
x_max   0.346790
x_mode  0.3467901443380824
y_mean  0.726803
y_sum   0.726803
y_count 1
y_min   0.726803
y_max   0.726803
y_mode  0.7268028627434533

a       eks
b       pan
i       2
x       0.7586799647899636
y       0.5221511083334797
i_mean  1.500000
i_sum   3
i_count 2
i_min   1
i_max   1
i_mode  1
x_mean  0.552735
x_sum   1.105470
x_count 2
x_min   0.346790
x_max   0.346790
x_mode  0.3467901443380824
y_mean  0.624477
y_sum   1.248954
y_count 2
y_min   0.522151
y_max   0.522151
y_mode  0.7268028627434533

a       wye
b       wye
i       3
x       0.20460330576630303
y       0.33831852551664776
i_mean  2.000000
i_sum   6
i_count 3
i_min   1
i_max   1
i_mode  1
x_mean  0.436691
x_sum   1.310073
x_count 3
x_min   0.204603
x_max   0.204603
x_mode  0.3467901443380824
y_mean  0.529091
y_sum   1.587272
y_count 3
y_min   0.338319
y_max   0.338319
y_mode  0.7268028627434533

a       eks
b       wye
i       4
x       0.38139939387114097
y       0.13418874328430463
i_mean  2.500000
i_sum   10
i_count 4
i_min   1
i_max   1
i_mode  1
x_mean  0.422868
x_sum   1.691473
x_count 4
x_min   0.204603
x_max   0.204603
x_mode  0.3467901443380824
y_mean  0.430365
y_sum   1.721461
y_count 4
y_min   0.134189
y_max   0.134189
y_mode  0.7268028627434533

a       wye
b       pan
i       5
x       0.5732889198020006
y       0.8636244699032729
i_mean  3.000000
i_sum   15
i_count 5
i_min   1
i_max   1
i_mode  1
x_mean  0.452952
x_sum   2.264762
x_count 5
x_min   0.204603
x_max   0.204603
x_mode  0.3467901443380824
y_mean  0.517017
y_sum   2.585086
y_count 5
y_min   0.134189
y_max   0.134189
y_mode  0.7268028627434533

a       zee
b       pan
i       6
x       0.5271261600918548
y       0.49322128674835697
i_mean  3.500000
i_sum   21
i_count 6
i_min   1
i_max   1
i_mode  1
x_mean  0.465315
x_sum   2.791888
x_count 6
x_min   0.204603
x_max   0.204603
x_mode  0.3467901443380824
y_mean  0.513051
y_sum   3.078307
y_count 6
y_min   0.134189
y_max   0.134189
y_mode  0.7268028627434533

a       eks
b       zee
i       7
x       0.6117840605678454
y       0.1878849191181694
i_mean  4.000000
i_sum   28
i_count 7
i_min   1
i_max   1
i_mode  1
x_mean  0.486239
x_sum   3.403672
x_count 7
x_min   0.204603
x_max   0.204603
x_mode  0.3467901443380824
y_mean  0.466599
y_sum   3.266192
y_count 7
y_min   0.134189
y_max   0.134189
y_mode  0.7268028627434533

a       zee
b       wye
i       8
x       0.5985540091064224
y       0.976181385699006
i_mean  4.500000
i_sum   36
i_count 8
i_min   1
i_max   1
i_mode  1
x_mean  0.500278
x_sum   4.002226
x_count 8
x_min   0.204603
x_max   0.204603
x_mode  0.3467901443380824
y_mean  0.530297
y_sum   4.242373
y_count 8
y_min   0.134189
y_max   0.134189
y_mode  0.7268028627434533

a       hat
b       wye
i       9
x       0.03144187646093577
y       0.7495507603507059
i_mean  5.000000
i_sum   45
i_count 9
i_min   1
i_max   1
i_mode  1
x_mean  0.448185
x_sum   4.033668
x_count 9
x_min   0.031442
x_max   0.031442
x_mode  0.3467901443380824
y_mean  0.554658
y_sum   4.991924
y_count 9
y_min   0.134189
y_max   0.134189
y_mode  0.7268028627434533

a       pan
b       wye
i       10
x       0.5026260055412137
y       0.9526183602969864
i_mean  5.500000
i_sum   55
i_count 10
i_min   1
i_max   1
i_mode  1
x_mean  0.453629
x_sum   4.536294
x_count 10
x_min   0.031442
x_max   0.031442
x_mode  0.3467901443380824
y_mean  0.594454
y_sum   5.944542
y_count 10
y_min   0.134189
y_max   0.134189
y_mode  0.7268028627434533

mlr --opprint stats1 -a mean,sum,count,min,max,mode -f i,x,y -g a ./reg_test/input/abixy
a   i_mean   i_sum i_count i_min i_max i_mode x_mean   x_sum    x_count x_min    x_max    x_mode              y_mean   y_sum    y_count y_min    y_max    y_mode
pan 5.500000 11    2       1     1     1      0.424708 0.849416 2       0.346790 0.346790 0.3467901443380824  0.839711 1.679421 2       0.726803 0.726803 0.7268028627434533
eks 4.333333 13    3       2     2     2      0.583954 1.751863 3       0.381399 0.381399 0.7586799647899636  0.281408 0.844225 3       0.134189 0.134189 0.5221511083334797
wye 4.000000 8     2       3     3     3      0.388946 0.777892 2       0.204603 0.204603 0.20460330576630303 0.600971 1.201943 2       0.338319 0.338319 0.33831852551664776
zee 7.000000 14    2       6     6     6      0.562840 1.125680 2       0.527126 0.527126 0.5271261600918548  0.734701 1.469403 2       0.493221 0.493221 0.49322128674835697
hat 9.000000 9     1       9     9     9      0.031442 0.031442 1       0.031442 0.031442 0.03144187646093577 0.749551 0.749551 1       0.749551 0.749551 0.7495507603507059

mlr --opprint stats1 -a min,p10,p50,mode,p90,max -f i,x,y -g a ./reg_test/input/abixy
a   i_min i_p10    i_p50     i_mode i_p90     i_max x_min    x_p10    x_p50    x_mode              x_p90    x_max    y_min    y_p10    y_p50    y_mode              y_p90    y_max
pan 1     1.000000 10.000000 1      10.000000 1     0.346790 0.346790 0.502626 0.3467901443380824  0.502626 0.346790 0.726803 0.726803 0.952618 0.7268028627434533  0.952618 0.726803
eks 2     2.000000 4.000000  2      7.000000  2     0.381399 0.381399 0.611784 0.7586799647899636  0.758680 0.381399 0.134189 0.134189 0.187885 0.5221511083334797  0.522151 0.134189
wye 3     3.000000 5.000000  3      5.000000  3     0.204603 0.204603 0.573289 0.20460330576630303 0.573289 0.204603 0.338319 0.338319 0.863624 0.33831852551664776 0.863624 0.338319
zee 6     6.000000 8.000000  6      8.000000  6     0.527126 0.527126 0.598554 0.5271261600918548  0.598554 0.527126 0.493221 0.493221 0.976181 0.49322128674835697 0.976181 0.493221
hat 9     9.000000 9.000000  9      9.000000  9     0.031442 0.031442 0.031442 0.03144187646093577 0.031442 0.031442 0.749551 0.749551 0.749551 0.7495507603507059  0.749551 0.749551

mlr --opprint stats1 -a mean,meaneb,stddev -f i,x,y -g a ./reg_test/input/abixy
a   i_mean   i_meaneb i_stddev x_mean   x_meaneb x_stddev y_mean   y_meaneb y_stddev
pan 5.500000 4.500000 6.363961 0.424708 0.077918 0.110193 0.839711 0.112908 0.159676
eks 4.333333 1.452966 2.516611 0.583954 0.109797 0.190174 0.281408 0.121365 0.210211
wye 4.000000 1.000000 1.414214 0.388946 0.184343 0.260700 0.600971 0.262653 0.371447
zee 7.000000 1.000000 1.414214 0.562840 0.035714 0.050507 0.734701 0.241480 0.341504
hat 9.000000 -        -        0.031442 -        -        0.749551 -        -

mlr --oxtab stats1 -s -a mean,sum,count,min,max,mode -f i,x,y -g a ./reg_test/input/abixy
a       pan
b       pan
i       1
x       0.3467901443380824
y       0.7268028627434533
i_mean  1.000000
i_sum   1
i_count 1
i_min   1
i_max   1
i_mode  1
x_mean  0.346790
x_sum   0.346790
x_count 1
x_min   0.346790
x_max   0.346790
x_mode  0.3467901443380824
y_mean  0.726803
y_sum   0.726803
y_count 1
y_min   0.726803
y_max   0.726803
y_mode  0.7268028627434533

a       eks
b       pan
i       2
x       0.7586799647899636
y       0.5221511083334797
i_mean  2.000000
i_sum   2
i_count 1
i_min   2
i_max   2
i_mode  2
x_mean  0.758680
x_sum   0.758680
x_count 1
x_min   0.758680
x_max   0.758680
x_mode  0.7586799647899636
y_mean  0.522151
y_sum   0.522151
y_count 1
y_min   0.522151
y_max   0.522151
y_mode  0.5221511083334797

a       wye
b       wye
i       3
x       0.20460330576630303
y       0.33831852551664776
i_mean  3.000000
i_sum   3
i_count 1
i_min   3
i_max   3
i_mode  3
x_mean  0.204603
x_sum   0.204603
x_count 1
x_min   0.204603
x_max   0.204603
x_mode  0.20460330576630303
y_mean  0.338319
y_sum   0.338319
y_count 1
y_min   0.338319
y_max   0.338319
y_mode  0.33831852551664776

a       eks
b       wye
i       4
x       0.38139939387114097
y       0.13418874328430463
i_mean  3.000000
i_sum   6
i_count 2
i_min   2
i_max   2
i_mode  2
x_mean  0.570040
x_sum   1.140079
x_count 2
x_min   0.381399
x_max   0.381399
x_mode  0.7586799647899636
y_mean  0.328170
y_sum   0.656340
y_count 2
y_min   0.134189
y_max   0.134189
y_mode  0.5221511083334797

a       wye
b       pan
i       5
x       0.5732889198020006
y       0.8636244699032729
i_mean  4.000000
i_sum   8
i_count 2
i_min   3
i_max   3
i_mode  3
x_mean  0.388946
x_sum   0.777892
x_count 2
x_min   0.204603
x_max   0.204603
x_mode  0.20460330576630303
y_mean  0.600971
y_sum   1.201943
y_count 2
y_min   0.338319
y_max   0.338319
y_mode  0.33831852551664776

a       zee
b       pan
i       6
x       0.5271261600918548
y       0.49322128674835697
i_mean  6.000000
i_sum   6
i_count 1
i_min   6
i_max   6
i_mode  6
x_mean  0.527126
x_sum   0.527126
x_count 1
x_min   0.527126
x_max   0.527126
x_mode  0.5271261600918548
y_mean  0.493221
y_sum   0.493221
y_count 1
y_min   0.493221
y_max   0.493221
y_mode  0.49322128674835697

a       eks
b       zee
i       7
x       0.6117840605678454
y       0.1878849191181694
i_mean  4.333333
i_sum   13
i_count 3
i_min   2
i_max   2
i_mode  2
x_mean  0.583954
x_sum   1.751863
x_count 3
x_min   0.381399
x_max   0.381399
x_mode  0.7586799647899636
y_mean  0.281408
y_sum   0.844225
y_count 3
y_min   0.134189
y_max   0.134189
y_mode  0.5221511083334797

a       zee
b       wye
i       8
x       0.5985540091064224
y       0.976181385699006
i_mean  7.000000
i_sum   14
i_count 2
i_min   6
i_max   6
i_mode  6
x_mean  0.562840
x_sum   1.125680
x_count 2
x_min   0.527126
x_max   0.527126
x_mode  0.5271261600918548
y_mean  0.734701
y_sum   1.469403
y_count 2
y_min   0.493221
y_max   0.493221
y_mode  0.49322128674835697

a       hat
b       wye
i       9
x       0.03144187646093577
y       0.7495507603507059
i_mean  9.000000
i_sum   9
i_count 1
i_min   9
i_max   9
i_mode  9
x_mean  0.031442
x_sum   0.031442
x_count 1
x_min   0.031442
x_max   0.031442
x_mode  0.03144187646093577
y_mean  0.749551
y_sum   0.749551
y_count 1
y_min   0.749551
y_max   0.749551
y_mode  0.7495507603507059

a       pan
b       wye
i       10
x       0.5026260055412137
y       0.9526183602969864
i_mean  5.500000
i_sum   11
i_count 2
i_min   1
i_max   1
i_mode  1
x_mean  0.424708
x_sum   0.849416
x_count 2
x_min   0.346790
x_max   0.346790
x_mode  0.3467901443380824
y_mean  0.839711
y_sum   1.679421
y_count 2
y_min   0.726803
y_max   0.726803
y_mode  0.7268028627434533

mlr --opprint stats1 -a mean,sum,count,min,max,mode -f i,x,y -g a,b ./reg_test/input/abixy
a   b   i_mean    i_sum i_count i_min i_max i_mode x_mean   x_sum    x_count x_min    x_max    x_mode              y_mean   y_sum    y_count y_min    y_max    y_mode
pan pan 1.000000  1     1       1     1     1      0.346790 0.346790 1       0.346790 0.346790 0.3467901443380824  0.726803 0.726803 1       0.726803 0.726803 0.7268028627434533
eks pan 2.000000  2     1       2     2     2      0.758680 0.758680 1       0.758680 0.758680 0.7586799647899636  0.522151 0.522151 1       0.522151 0.522151 0.5221511083334797
wye wye 3.000000  3     1       3     3     3      0.204603 0.204603 1       0.204603 0.204603 0.20460330576630303 0.338319 0.338319 1       0.338319 0.338319 0.33831852551664776
eks wye 4.000000  4     1       4     4     4      0.381399 0.381399 1       0.381399 0.381399 0.38139939387114097 0.134189 0.134189 1       0.134189 0.134189 0.13418874328430463
wye pan 5.000000  5     1       5     5     5      0.573289 0.573289 1       0.573289 0.573289 0.5732889198020006  0.863624 0.863624 1       0.863624 0.863624 0.8636244699032729
zee pan 6.000000  6     1       6     6     6      0.527126 0.527126 1       0.527126 0.527126 0.5271261600918548  0.493221 0.493221 1       0.493221 0.493221 0.49322128674835697
eks zee 7.000000  7     1       7     7     7      0.611784 0.611784 1       0.611784 0.611784 0.6117840605678454  0.187885 0.187885 1       0.187885 0.187885 0.1878849191181694
zee wye 8.000000  8     1       8     8     8      0.598554 0.598554 1       0.598554 0.598554 0.5985540091064224  0.976181 0.976181 1       0.976181 0.976181 0.976181385699006
hat wye 9.000000  9     1       9     9     9      0.031442 0.031442 1       0.031442 0.031442 0.03144187646093577 0.749551 0.749551 1       0.749551 0.749551 0.7495507603507059
pan wye 10.000000 10    1       10    10    10     0.502626 0.502626 1       0.502626 0.502626 0.5026260055412137  0.952618 0.952618 1       0.952618 0.952618 0.9526183602969864

mlr --opprint stats1 -a min,p10,p50,mode,p90,max -f i,x,y -g a,b ./reg_test/input/abixy
a   b   i_min i_p10     i_p50     i_mode i_p90     i_max x_min    x_p10    x_p50    x_mode              x_p90    x_max    y_min    y_p10    y_p50    y_mode              y_p90    y_max
pan pan 1     1.000000  1.000000  1      1.000000  1     0.346790 0.346790 0.346790 0.3467901443380824  0.346790 0.346790 0.726803 0.726803 0.726803 0.7268028627434533  0.726803 0.726803
eks pan 2     2.000000  2.000000  2      2.000000  2     0.758680 0.758680 0.758680 0.7586799647899636  0.758680 0.758680 0.522151 0.522151 0.522151 0.5221511083334797  0.522151 0.522151
wye wye 3     3.000000  3.000000  3      3.000000  3     0.204603 0.204603 0.204603 0.20460330576630303 0.204603 0.204603 0.338319 0.338319 0.338319 0.33831852551664776 0.338319 0.338319
eks wye 4     4.000000  4.000000  4      4.000000  4     0.381399 0.381399 0.381399 0.38139939387114097 0.381399 0.381399 0.134189 0.134189 0.134189 0.13418874328430463 0.134189 0.134189
wye pan 5     5.000000  5.000000  5      5.000000  5     0.573289 0.573289 0.573289 0.5732889198020006  0.573289 0.573289 0.863624 0.863624 0.863624 0.8636244699032729  0.863624 0.863624
zee pan 6     6.000000  6.000000  6      6.000000  6     0.527126 0.527126 0.527126 0.5271261600918548  0.527126 0.527126 0.493221 0.493221 0.493221 0.49322128674835697 0.493221 0.493221
eks zee 7     7.000000  7.000000  7      7.000000  7     0.611784 0.611784 0.611784 0.6117840605678454  0.611784 0.611784 0.187885 0.187885 0.187885 0.1878849191181694  0.187885 0.187885
zee wye 8     8.000000  8.000000  8      8.000000  8     0.598554 0.598554 0.598554 0.5985540091064224  0.598554 0.598554 0.976181 0.976181 0.976181 0.976181385699006   0.976181 0.976181
hat wye 9     9.000000  9.000000  9      9.000000  9     0.031442 0.031442 0.031442 0.03144187646093577 0.031442 0.031442 0.749551 0.749551 0.749551 0.7495507603507059  0.749551 0.749551
pan wye 10    10.000000 10.000000 10     10.000000 10    0.502626 0.502626 0.502626 0.5026260055412137  0.502626 0.502626 0.952618 0.952618 0.952618 0.9526183602969864  0.952618 0.952618

mlr --opprint stats1 -a mean,meaneb,stddev -f i,x,y -g a,b ./reg_test/input/abixy
a   b   i_mean    i_meaneb i_stddev x_mean   x_meaneb x_stddev y_mean   y_meaneb y_stddev
pan pan 1.000000  -        -        0.346790 -        -        0.726803 -        -
eks pan 2.000000  -        -        0.758680 -        -        0.522151 -        -
wye wye 3.000000  -        -        0.204603 -        -        0.338319 -        -
eks wye 4.000000  -        -        0.381399 -        -        0.134189 -        -
wye pan 5.000000  -        -        0.573289 -        -        0.863624 -        -
zee pan 6.000000  -        -        0.527126 -        -        0.493221 -        -
eks zee 7.000000  -        -        0.611784 -        -        0.187885 -        -
zee wye 8.000000  -        -        0.598554 -        -        0.976181 -        -
hat wye 9.000000  -        -        0.031442 -        -        0.749551 -        -
pan wye 10.000000 -        -        0.502626 -        -        0.952618 -        -

mlr --oxtab stats1 -s -a mean,sum,count,min,max,mode -f i,x,y -g a,b ./reg_test/input/abixy
a       pan
b       pan
i       1
x       0.3467901443380824
y       0.7268028627434533
i_mean  1.000000
i_sum   1
i_count 1
i_min   1
i_max   1
i_mode  1
x_mean  0.346790
x_sum   0.346790
x_count 1
x_min   0.346790
x_max   0.346790
x_mode  0.3467901443380824
y_mean  0.726803
y_sum   0.726803
y_count 1
y_min   0.726803
y_max   0.726803
y_mode  0.7268028627434533

a       eks
b       pan
i       2
x       0.7586799647899636
y       0.5221511083334797
i_mean  2.000000
i_sum   2
i_count 1
i_min   2
i_max   2
i_mode  2
x_mean  0.758680
x_sum   0.758680
x_count 1
x_min   0.758680
x_max   0.758680
x_mode  0.7586799647899636
y_mean  0.522151
y_sum   0.522151
y_count 1
y_min   0.522151
y_max   0.522151
y_mode  0.5221511083334797

a       wye
b       wye
i       3
x       0.20460330576630303
y       0.33831852551664776
i_mean  3.000000
i_sum   3
i_count 1
i_min   3
i_max   3
i_mode  3
x_mean  0.204603
x_sum   0.204603
x_count 1
x_min   0.204603
x_max   0.204603
x_mode  0.20460330576630303
y_mean  0.338319
y_sum   0.338319
y_count 1
y_min   0.338319
y_max   0.338319
y_mode  0.33831852551664776

a       eks
b       wye
i       4
x       0.38139939387114097
y       0.13418874328430463
i_mean  4.000000
i_sum   4
i_count 1
i_min   4
i_max   4
i_mode  4
x_mean  0.381399
x_sum   0.381399
x_count 1
x_min   0.381399
x_max   0.381399
x_mode  0.38139939387114097
y_mean  0.134189
y_sum   0.134189
y_count 1
y_min   0.134189
y_max   0.134189
y_mode  0.13418874328430463

a       wye
b       pan
i       5
x       0.5732889198020006
y       0.8636244699032729
i_mean  5.000000
i_sum   5
i_count 1
i_min   5
i_max   5
i_mode  5
x_mean  0.573289
x_sum   0.573289
x_count 1
x_min   0.573289
x_max   0.573289
x_mode  0.5732889198020006
y_mean  0.863624
y_sum   0.863624
y_count 1
y_min   0.863624
y_max   0.863624
y_mode  0.8636244699032729

a       zee
b       pan
i       6
x       0.5271261600918548
y       0.49322128674835697
i_mean  6.000000
i_sum   6
i_count 1
i_min   6
i_max   6
i_mode  6
x_mean  0.527126
x_sum   0.527126
x_count 1
x_min   0.527126
x_max   0.527126
x_mode  0.5271261600918548
y_mean  0.493221
y_sum   0.493221
y_count 1
y_min   0.493221
y_max   0.493221
y_mode  0.49322128674835697

a       eks
b       zee
i       7
x       0.6117840605678454
y       0.1878849191181694
i_mean  7.000000
i_sum   7
i_count 1
i_min   7
i_max   7
i_mode  7
x_mean  0.611784
x_sum   0.611784
x_count 1
x_min   0.611784
x_max   0.611784
x_mode  0.6117840605678454
y_mean  0.187885
y_sum   0.187885
y_count 1
y_min   0.187885
y_max   0.187885
y_mode  0.1878849191181694

a       zee
b       wye
i       8
x       0.5985540091064224
y       0.976181385699006
i_mean  8.000000
i_sum   8
i_count 1
i_min   8
i_max   8
i_mode  8
x_mean  0.598554
x_sum   0.598554
x_count 1
x_min   0.598554
x_max   0.598554
x_mode  0.5985540091064224
y_mean  0.976181
y_sum   0.976181
y_count 1
y_min   0.976181
y_max   0.976181
y_mode  0.976181385699006

a       hat
b       wye
i       9
x       0.03144187646093577
y       0.7495507603507059
i_mean  9.000000
i_sum   9
i_count 1
i_min   9
i_max   9
i_mode  9
x_mean  0.031442
x_sum   0.031442
x_count 1
x_min   0.031442
x_max   0.031442
x_mode  0.03144187646093577
y_mean  0.749551
y_sum   0.749551
y_count 1
y_min   0.749551
y_max   0.749551
y_mode  0.7495507603507059

a       pan
b       wye
i       10
x       0.5026260055412137
y       0.9526183602969864
i_mean  10.000000
i_sum   10
i_count 1
i_min   10
i_max   10
i_mode  10
x_mean  0.502626
x_sum   0.502626
x_count 1
x_min   0.502626
x_max   0.502626
x_mode  0.5026260055412137
y_mean  0.952618
y_sum   0.952618
y_count 1
y_min   0.952618
y_max   0.952618
y_mode  0.9526183602969864

mlr --oxtab stats1 -a mean -f x ./reg_test/input/abixy-het
x_mean 0.440334

mlr --oxtab stats1 -a mean -f x -g a ./reg_test/input/abixy-het
a      pan
x_mean 0.424708

a      eks
x_mean 0.583954

a      wye
x_mean 

a      zee
x_mean 0.562840

mlr --opprint stats2 -a linreg-ols,linreg-pca,r2,corr,cov -f x,y,xy,y2,x2,x2 ./reg_test/input/abixy-wide
x_y_ols_m x_y_ols_b x_y_ols_n x_y_pca_m x_y_pca_b x_y_pca_n x_y_pca_quality x_y_r2   x_y_corr x_y_cov  xy_y2_ols_m xy_y2_ols_b xy_y2_ols_n xy_y2_pca_m xy_y2_pca_b xy_y2_pca_n xy_y2_pca_quality xy_y2_r2 xy_y2_corr xy_y2_cov x2_x2_ols_m x2_x2_ols_b x2_x2_ols_n x2_x2_pca_m x2_x2_pca_b x2_x2_pca_n x2_x2_pca_quality x2_x2_r2 x2_x2_corr x2_x2_cov
0.028351  0.487644  2000      1.332924  -0.170590 2000      0.056909        0.000791 0.028120 0.002330 0.893610    0.107060    2000        1.529534    -0.055477   2000        0.824336          0.447971 0.669306   0.045036  1.000000    0.000000    2000        1.000000    0.000000    2000        1.000000          1.000000 1.000000   0.087709

mlr --opprint stats2 -a linreg-ols,linreg-pca,r2,corr,cov -f x,y,xy,y2,x2,x2 -g a,b ./reg_test/input/abixy-wide
a   b   x_y_ols_m x_y_ols_b x_y_ols_n x_y_pca_m x_y_pca_b x_y_pca_n x_y_pca_quality x_y_r2   x_y_corr  x_y_cov   xy_y2_ols_m xy_y2_ols_b xy_y2_ols_n xy_y2_pca_m xy_y2_pca_b xy_y2_pca_n xy_y2_pca_quality xy_y2_r2 xy_y2_corr xy_y2_cov x2_x2_ols_m x2_x2_ols_b x2_x2_ols_n x2_x2_pca_m x2_x2_pca_b x2_x2_pca_n x2_x2_pca_quality x2_x2_r2 x2_x2_corr x2_x2_cov
cat pan 0.054420  0.481777  89        3.636062  -1.221602 89        0.177683        0.002504 0.050036  0.003777  0.950908    0.105754    89          1.715574    -0.081719   89          0.830612          0.435336 0.659800   0.041616  1.000000    0.000000    89          1.000000    0.000000    89          1.000000          1.000000 1.000000   0.066303
pan wye -0.145486 0.584799  78        -1.340927 1.199920  78        0.254025        0.019479 -0.139568 -0.012683 0.908151    0.126628    78          1.595150    -0.045034   78          0.824114          0.438850 0.662457   0.046203  1.000000    0.000000    78          1.000000    0.000000    78          1.000000          1.000000 1.000000   0.093192
wye cat 0.185913  0.377639  74        1.135325  -0.145894 74        0.309499        0.033002 0.181665  0.014494  0.969266    0.040602    74          1.406365    -0.081379   74          0.868480          0.561236 0.749157   0.052090  1.000000    0.000000    74          1.000000    0.000000    74          1.000000          1.000000 1.000000   0.086883
dog hat 0.100096  0.448757  88        0.810749  0.097346  88        0.189256        0.010462 0.102283  0.008036  0.919149    0.090504    88          1.425774    -0.038344   88          0.846209          0.507155 0.712148   0.045034  1.000000    0.000000    88          1.000000    0.000000    88          1.000000          1.000000 1.000000   0.081226
dog pan -0.066834 0.590647  87        -0.254112 0.688837  87        0.275316        0.005924 -0.076969 -0.005709 0.726118    0.164937    87          1.566309    -0.075073   87          0.749025          0.315011 0.561259   0.034107  1.000000    0.000000    87          1.000000    0.000000    87          1.000000          1.000000 1.000000   0.098975
pan pan 0.094932  0.461566  77        0.672369  0.189898  77        0.192719        0.009768 0.098832  0.007175  0.822261    0.123441    77          1.312543    0.003200    77          0.820351          0.465390 0.682195   0.039784  1.000000    0.000000    77          1.000000    0.000000    77          1.000000          1.000000 1.000000   0.080908
hat hat 0.043668  0.405219  88        10.170494 -5.125282 88        0.310513        0.001324 0.036392  0.003037  1.128896    0.015188    88          1.414166    -0.052514   88          0.922308          0.708725 0.841858   0.060975  1.000000    0.000000    88          1.000000    0.000000    88          1.000000          1.000000 1.000000   0.084636
wye hat 0.043018  0.496029  87        0.254879  0.395780  87        0.177794        0.002197 0.046876  0.004023  0.720402    0.165623    87          1.376136    0.002792    87          0.760716          0.353558 0.594608   0.038763  1.000000    0.000000    87          1.000000    0.000000    87          1.000000          1.000000 1.000000   0.091675
pan hat 0.120797  0.448197  67        1.597359  -0.325695 67        0.225137        0.013060 0.114278  0.008987  0.962678    0.076920    67          1.285796    -0.012566   67          0.887704          0.622353 0.788893   0.054965  1.000000    0.000000    67          1.000000    0.000000    67          1.000000          1.000000 1.000000   0.079553
cat hat 0.172391  0.464384  90        0.959329  0.086790  90        0.296109        0.030150 0.173639  0.015030  0.904257    0.133482    90          1.415658    -0.008369   90          0.841567          0.498171 0.705812   0.055626  1.000000    0.000000    90          1.000000    0.000000    90          1.000000          1.000000 1.000000   0.089895
hat wye -0.022975 0.496361  70        -1.765884 1.344268  70        0.051493        0.000514 -0.022665 -0.002000 0.971929    0.096088    70          1.989422    -0.142072   70          0.825656          0.386354 0.621574   0.040126  1.000000    0.000000    70          1.000000    0.000000    70          1.000000          1.000000 1.000000   0.075309
dog dog 0.078397  0.489236  87        0.354494  0.351041  87        0.242210        0.007619 0.087288  0.008214  0.776967    0.150999    87          1.354405    -0.006432   87          0.792265          0.408257 0.638950   0.049648  1.000000    0.000000    87          1.000000    0.000000    87          1.000000          1.000000 1.000000   0.106525
wye dog 0.116403  0.425576  76        2.367821  -0.777734 76        0.254607        0.011048 0.105109  0.007867  0.925781    0.071192    76          1.453590    -0.070509   76          0.845204          0.501559 0.708208   0.046440  1.000000    0.000000    76          1.000000    0.000000    76          1.000000          1.000000 1.000000   0.081433
wye wye -0.188354 0.613934  67        -1.433772 1.217887  67        0.316070        0.031156 -0.176512 -0.015876 0.876717    0.159179    67          2.044493    -0.118503   67          0.795455          0.325193 0.570257   0.042026  1.000000    0.000000    67          1.000000    0.000000    67          1.000000          1.000000 1.000000   0.087513
dog wye 0.029527  0.502643  79        0.496713  0.282511  79        0.073039        0.000913 0.030211  0.002391  0.904925    0.120816    79          1.609123    -0.052245   79          0.821822          0.432413 0.657581   0.042857  1.000000    0.000000    79          1.000000    0.000000    79          1.000000          1.000000 1.000000   0.083924
cat dog 0.057573  0.408644  78        0.728479  0.071114  78        0.116103        0.003442 0.058671  0.005320  0.884325    0.079999    78          1.418207    -0.040344   78          0.832998          0.479596 0.692528   0.044762  1.000000    0.000000    78          1.000000    0.000000    78          1.000000          1.000000 1.000000   0.098206
hat pan -0.154393 0.564981  85        -0.845852 0.911026  85        0.276955        0.025143 -0.158566 -0.012756 0.911165    0.104362    85          1.763740    -0.092987   85          0.814584          0.397150 0.630199   0.035622  1.000000    0.000000    85          1.000000    0.000000    85          1.000000          1.000000 1.000000   0.087879
cat wye -0.014851 0.564875  77        -0.572708 0.892322  77        0.034146        0.000224 -0.014982 -0.000966 0.878820    0.086362    77          1.447244    -0.098657   77          0.827119          0.463961 0.681147   0.041096  1.000000    0.000000    77          1.000000    0.000000    77          1.000000          1.000000 1.000000   0.081922
hat cat -0.022859 0.498539  88        -0.156242 0.565723  88        0.149344        0.000610 -0.024689 -0.002116 0.840965    0.111121    88          1.663518    -0.088942   88          0.793883          0.373515 0.611158   0.036575  1.000000    0.000000    88          1.000000    0.000000    88          1.000000          1.000000 1.000000   0.093075
dog cat 0.104057  0.428559  83        2.712382  -1.005787 83        0.250036        0.008705 0.093300  0.007122  1.080443    0.023866    83          1.653922    -0.133367   83          0.875586          0.547103 0.739664   0.050357  1.000000    0.000000    83          1.000000    0.000000    83          1.000000          1.000000 1.000000   0.075381
hat dog 0.041849  0.427228  78        0.403977  0.254919  78        0.118494        0.001918 0.043789  0.003856  0.776135    0.114930    78          1.475403    -0.036508   78          0.779056          0.372058 0.609966   0.040583  1.000000    0.000000    78          1.000000    0.000000    78          1.000000          1.000000 1.000000   0.104033
pan dog 0.119510  0.467833  73        2.492496  -0.761490 73        0.266455        0.011427 0.106896  0.009302  0.948592    0.107556    73          1.408389    -0.022846   73          0.860243          0.541263 0.735706   0.056609  1.000000    0.000000    73          1.000000    0.000000    73          1.000000          1.000000 1.000000   0.088101
cat cat 0.016257  0.425410  79        0.432946  0.225535  79        0.044275        0.000273 0.016510  0.001350  0.930954    0.072476    79          1.624993    -0.072669   79          0.830029          0.446764 0.668404   0.036267  1.000000    0.000000    79          1.000000    0.000000    79          1.000000          1.000000 1.000000   0.086429
pan cat -0.188523 0.616919  89        -0.898665 0.953923  89        0.324264        0.037036 -0.192447 -0.016206 0.781770    0.176617    89          2.020454    -0.113587   89          0.762332          0.278739 0.527958   0.032984  1.000000    0.000000    89          1.000000    0.000000    89          1.000000          1.000000 1.000000   0.093193
wye pan 0.229443  0.444446  66        1.313689  -0.098124 66        0.365811        0.046722 0.216152  0.020367  0.887659    0.145052    66          1.471906    -0.030176   66          0.827911          0.462545 0.680107   0.064496  1.000000    0.000000    66          1.000000    0.000000    66          1.000000          1.000000 1.000000   0.103497

mlr --oxtab stats2 -s -a linreg-ols,linreg-pca,r2,corr,cov -f x,y,xy,y2,x2,x2 ./reg_test/input/abixy-wide-short
a                 cat
b                 pan
i                 1
x                 0.5117389009583777
y                 0.08295224980036853
x2                0.2618767027540883
xy                0.0424498931448654
y2                0.006881075746942741
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 pan
b                 wye
i                 2
x                 0.5225940442098578
y                 0.511678736087022
x2                0.27310453504361476
xy                0.2674002600279053
y2                0.26181512896361225
x_y_ols_m         39.495240
x_y_ols_b         -20.128298
x_y_ols_n         2
x_y_pca_m         39.495240
x_y_pca_b         -20.128298
x_y_pca_n         2
x_y_pca_quality   1.000000
x_y_r2            1.000000
x_y_corr          1.000000
x_y_cov           0.002327
xy_y2_ols_m       1.133290
xy_y2_ols_b       -0.041227
xy_y2_ols_n       2
xy_y2_pca_m       1.133290
xy_y2_pca_b       -0.041227
xy_y2_pca_n       2
xy_y2_pca_quality 1.000000
xy_y2_r2          1.000000
xy_y2_corr        1.000000
xy_y2_cov         0.028674
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       2
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       2
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.000063

a                 wye
b                 cat
i                 3
x                 0.8150401717873625
y                 0.07989551500795256
x2                0.6642904816271734
xy                0.06511805427712146
y2                0.006383293318385972
x_y_ols_m         -0.689881
x_y_ols_b         0.650125
x_y_ols_n         3
x_y_pca_m         -2.057762
x_y_pca_b         1.493365
x_y_pca_n         3
x_y_pca_quality   0.725269
x_y_r2            0.228338
x_y_corr          -0.477847
x_y_cov           -0.020424
xy_y2_ols_m       1.184397
xy_y2_ols_b       -0.056344
xy_y2_ols_n       3
xy_y2_pca_m       1.190469
xy_y2_pca_b       -0.057103
xy_y2_pca_n       3
xy_y2_pca_quality 0.997884
xy_y2_r2          0.991315
xy_y2_corr        0.995648
xy_y2_cov         0.018168
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       3
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       3
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.052515

a                 dog
b                 hat
i                 4
x                 0.4488733555675044
y                 0.5730530513123552
x2                0.20148728933843124
xy                0.25722824606077416
y2                0.32838979961840076
x_y_ols_m         -1.054065
x_y_ols_b         0.917520
x_y_ols_n         4
x_y_pca_m         -2.068130
x_y_pca_b         1.500163
x_y_pca_n         4
x_y_pca_quality   0.845806
x_y_r2            0.416082
x_y_corr          -0.645044
x_y_cov           -0.028205
xy_y2_ols_m       1.365739
xy_y2_ols_b       -0.064987
xy_y2_ols_n       4
xy_y2_pca_m       1.406929
xy_y2_pca_b       -0.071497
xy_y2_pca_n       4
xy_y2_pca_quality 0.989979
xy_y2_r2          0.956155
xy_y2_corr        0.977832
xy_y2_cov         0.019937
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       4
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       4
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.044838

a                 dog
b                 pan
i                 5
x                 0.2946557960430134
y                 0.6850437256584863
x2                0.08682203814174191
xy                0.20185210430817294
y2                0.46928490606405937
x_y_ols_m         -1.176419
x_y_ols_b         0.996592
x_y_ols_n         5
x_y_pca_m         -1.681618
x_y_pca_b         1.258579
x_y_pca_n         5
x_y_pca_quality   0.899128
x_y_r2            0.607344
x_y_corr          -0.779323
x_y_cov           -0.042043
xy_y2_ols_m       1.565652
xy_y2_ols_b       -0.046615
xy_y2_ols_n       5
xy_y2_pca_m       2.169036
xy_y2_pca_b       -0.147265
xy_y2_pca_n       5
xy_y2_pca_quality 0.936719
xy_y2_r2          0.667168
xy_y2_corr        0.816804
xy_y2_cov         0.017742
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       5
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       5
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.047501

a                 wye
b                 cat
i                 6
x                 0.048709182664292916
y                 0.5851879044762575
x2                0.0023725844758234536
xy                0.02850402453206882
y2                0.34244488354531344
x_y_ols_m         -0.752322
x_y_ols_b         0.750859
x_y_ols_n         6
x_y_pca_m         -1.066519
x_y_pca_b         0.889190
x_y_pca_n         6
x_y_pca_quality   0.836548
x_y_r2            0.515958
x_y_corr          -0.718302
x_y_cov           -0.049192
xy_y2_ols_m       0.917730
xy_y2_ols_b       0.103935
xy_y2_ols_n       6
xy_y2_pca_m       2.512667
xy_y2_pca_b       -0.125351
xy_y2_pca_n       6
xy_y2_pca_quality 0.807995
xy_y2_r2          0.286403
xy_y2_corr        0.535166
xy_y2_cov         0.011246
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       6
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       6
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.052519

a                 dog
b                 hat
i                 7
x                 0.8500003149528544
y                 0.2984098741712895
x2                0.7225005354199517
xy                0.25364848703063775
y2                0.08904845300292483
x_y_ols_m         -0.612818
x_y_ols_b         0.707992
x_y_ols_n         7
x_y_pca_m         -0.842190
x_y_pca_b         0.822403
x_y_pca_n         7
x_y_pca_quality   0.820362
x_y_r2            0.476303
x_y_corr          -0.690147
x_y_cov           -0.048089
xy_y2_ols_m       0.592008
xy_y2_ols_b       0.120493
xy_y2_ols_n       7
xy_y2_pca_m       3.299160
xy_y2_pca_b       -0.311183
xy_y2_pca_n       7
xy_y2_pca_quality 0.722139
xy_y2_r2          0.126356
xy_y2_corr        0.355466
xy_y2_cov         0.007067
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       7
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       7
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.075886

a                 pan
b                 pan
i                 8
x                 0.616507208914765
y                 0.25924335982487057
x2                0.38008113864387366
xy                0.15982540019531707
y2                0.06720711961328732
x_y_ols_m         -0.627947
x_y_ols_b         0.706893
x_y_ols_n         8
x_y_pca_m         -0.857225
x_y_pca_b         0.824631
x_y_pca_n         8
x_y_pca_quality   0.826128
x_y_r2            0.489375
x_y_corr          -0.699554
x_y_cov           -0.043324
xy_y2_ols_m       0.591342
xy_y2_ols_b       0.102111
xy_y2_ols_n       8
xy_y2_pca_m       3.718931
xy_y2_pca_b       -0.396750
xy_y2_pca_n       8
xy_y2_pca_quality 0.737121
xy_y2_r2          0.115022
xy_y2_corr        0.339150
xy_y2_cov         0.006050
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       8
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       8
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.065557

a                 hat
b                 hat
i                 9
x                 0.33786884067769307
y                 0.6036735617015514
x2                0.11415535350088835
xy                0.203962486439877
y2                0.3644217690974368
x_y_ols_m         -0.661274
x_y_ols_b         0.735462
x_y_ols_n         9
x_y_pca_m         -0.890432
x_y_pca_b         0.848665
x_y_pca_n         9
x_y_pca_quality   0.838021
x_y_r2            0.516776
x_y_corr          -0.718871
x_y_cov           -0.042188
xy_y2_ols_m       0.667659
xy_y2_ols_b       0.105305
xy_y2_ols_n       9
xy_y2_pca_m       3.726998
xy_y2_pca_b       -0.397782
xy_y2_pca_n       9
xy_y2_pca_quality 0.764687
xy_y2_r2          0.134705
xy_y2_corr        0.367022
xy_y2_cov         0.006124
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       9
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       9
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.062259

a                 wye
b                 hat
i                 10
x                 0.3834648944206174
y                 0.4999709279216641
x2                0.14704532525301522
xy                0.19172129908885902
y2                0.24997092876684981
x_y_ols_m         -0.664725
x_y_ols_b         0.738937
x_y_ols_n         10
x_y_pca_m         -0.888643
x_y_pca_b         0.847077
x_y_pca_n         10
x_y_pca_quality   0.841594
x_y_r2            0.524349
x_y_corr          -0.724120
x_y_cov           -0.038508
xy_y2_ols_m       0.673183
xy_y2_ols_b       0.106048
xy_y2_ols_n       10
xy_y2_pca_m       3.679574
xy_y2_pca_b       -0.396534
xy_y2_pca_n       10
xy_y2_pca_quality 0.765015
xy_y2_r2          0.137573
xy_y2_corr        0.370908
xy_y2_cov         0.005539
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       10
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       10
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.057703

a                 pan
b                 hat
i                 11
x                 0.025474999754416028
y                 0.7861954915044592
x2                0.0006489756124874967
xy                0.020028329952999087
y2                0.6181033508619382
x_y_ols_m         -0.702240
x_y_ols_b         0.761330
x_y_ols_n         11
x_y_pca_m         -0.861995
x_y_pca_b         0.831839
x_y_pca_n         11
x_y_pca_quality   0.884552
x_y_r2            0.623708
x_y_corr          -0.789752
x_y_cov           -0.049973
xy_y2_ols_m       -0.038359
xy_y2_ols_b       0.260804
xy_y2_ols_n       11
xy_y2_pca_m       -82.143959
xy_y2_pca_b       12.888187
xy_y2_pca_n       11
xy_y2_pca_quality 0.759203
xy_y2_r2          0.000355
xy_y2_corr        -0.018828
xy_y2_cov         -0.000360
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       11
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       11
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.059303

a                 cat
b                 hat
i                 12
x                 0.6335445699880142
y                 0.15467178563525052
x2                0.4013787221612979
xy                0.0979914699195631
y2                0.02392336127159689
x_y_ols_m         -0.740466
x_y_ols_b         0.765334
x_y_ols_n         12
x_y_pca_m         -0.911766
x_y_pca_b         0.843681
x_y_pca_n         12
x_y_pca_quality   0.887843
x_y_r2            0.635324
x_y_corr          -0.797072
x_y_cov           -0.050182
xy_y2_ols_m       0.085108
xy_y2_ols_b       0.222963
xy_y2_ols_n       12
xy_y2_pca_m       41.549828
xy_y2_pca_b       -5.961259
xy_y2_pca_n       12
xy_y2_pca_quality 0.780003
xy_y2_r2          0.001597
xy_y2_corr        0.039969
xy_y2_cov         0.000747
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       12
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       12
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.055589

a                 hat
b                 wye
i                 13
x                 0.35922068401384877
y                 0.8502678133887914
x2                0.1290394998233774
xy                0.30543378552048117
y2                0.7229553544849566
x_y_ols_m         -0.782612
x_y_ols_b         0.811286
x_y_ols_n         13
x_y_pca_m         -1.047326
x_y_pca_b         0.930360
x_y_pca_n         13
x_y_pca_quality   0.861099
x_y_r2            0.571131
x_y_corr          -0.755732
x_y_cov           -0.049199
xy_y2_ols_m       0.659118
xy_y2_ols_b       0.166913
xy_y2_ols_n       13
xy_y2_pca_m       6.994463
xy_y2_pca_b       -0.854132
xy_y2_pca_n       13
xy_y2_pca_quality 0.838549
xy_y2_r2          0.078760
xy_y2_corr        0.280642
xy_y2_cov         0.006543
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       13
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       13
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.052514

a                 dog
b                 dog
i                 14
x                 0.5440047442770544
y                 0.933608851612059
x2                0.2959411617959433
xy                0.5078876445760125
y2                0.8716254878083876
x_y_ols_m         -0.719761
x_y_ols_b         0.821739
x_y_ols_n         14
x_y_pca_m         -1.259269
x_y_pca_b         1.068052
x_y_pca_n         14
x_y_pca_quality   0.775265
x_y_r2            0.388115
x_y_corr          -0.622988
x_y_cov           -0.042223
xy_y2_ols_m       1.175278
xy_y2_ols_b       0.097368
xy_y2_ols_n       14
xy_y2_pca_m       3.119062
xy_y2_pca_b       -0.264044
xy_y2_pca_n       14
xy_y2_pca_quality 0.866432
xy_y2_r2          0.322054
xy_y2_corr        0.567498
xy_y2_cov         0.020862
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       14
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       14
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.048565

a                 wye
b                 dog
i                 15
x                 0.4689175303764642
y                 0.09048353045392021
x2                0.21988365029436224
xy                0.04242931364019586
y2                0.008187269283405506
x_y_ols_m         -0.725720
x_y_ols_b         0.798215
x_y_ols_n         15
x_y_pca_m         -1.432456
x_y_pca_b         1.121457
x_y_pca_n         15
x_y_pca_quality   0.758098
x_y_r2            0.343569
x_y_corr          -0.586148
x_y_cov           -0.039539
xy_y2_ols_m       1.249777
xy_y2_ols_b       0.074959
xy_y2_ols_n       15
xy_y2_pca_m       2.985574
xy_y2_pca_b       -0.231176
xy_y2_pca_n       15
xy_y2_pca_quality 0.877117
xy_y2_r2          0.362173
xy_y2_corr        0.601808
xy_y2_cov         0.022316
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       15
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       15
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.045219

a                 pan
b                 pan
i                 16
x                 0.3959177828066379
y                 0.6339858483805666
x2                0.15675089074252413
xy                0.25100627142161924
y2                0.4019380559468268
x_y_ols_m         -0.734975
x_y_ols_b         0.810106
x_y_ols_n         16
x_y_pca_m         -1.451312
x_y_pca_b         1.134988
x_y_pca_n         16
x_y_pca_quality   0.761173
x_y_r2            0.346218
x_y_corr          -0.588403
x_y_cov           -0.037547
xy_y2_ols_m       1.253418
xy_y2_ols_b       0.075130
xy_y2_ols_n       16
xy_y2_pca_m       2.945315
xy_y2_pca_b       -0.231155
xy_y2_pca_n       16
xy_y2_pca_quality 0.877563
xy_y2_r2          0.368261
xy_y2_corr        0.606845
xy_y2_cov         0.021325
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       16
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       16
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.042872

a                 dog
b                 hat
i                 17
x                 0.34033844788864975
y                 0.8845934733681523
x2                0.11583025911125516
xy                0.3010611697385466
y2                0.782505613125532
x_y_ols_m         -0.779408
x_y_ols_b         0.849058
x_y_ols_n         17
x_y_pca_m         -1.579107
x_y_pca_b         1.206423
x_y_pca_n         17
x_y_pca_quality   0.772982
x_y_r2            0.349689
x_y_corr          -0.591345
x_y_cov           -0.037916
xy_y2_ols_m       1.392136
xy_y2_ols_b       0.068451
xy_y2_ols_n       17
xy_y2_pca_m       3.095298
xy_y2_pca_b       -0.251899
xy_y2_pca_n       17
xy_y2_pca_quality 0.896358
xy_y2_r2          0.398830
xy_y2_corr        0.631530
xy_y2_cov         0.023385
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       17
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       17
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.041308

a                 wye
b                 wye
i                 18
x                 0.6770613653962891
y                 0.896307226056897
x2                0.4584120925122874
xy                0.6068549942886431
y2                0.8033666434818095
x_y_ols_m         -0.628521
x_y_ols_b         0.811643
x_y_ols_n         18
x_y_pca_m         -1.834767
x_y_pca_b         1.366109
x_y_pca_n         18
x_y_pca_quality   0.694668
x_y_r2            0.218178
x_y_corr          -0.467095
x_y_cov           -0.030628
xy_y2_ols_m       1.292066
xy_y2_ols_b       0.083495
xy_y2_ols_n       18
xy_y2_pca_m       2.354328
xy_y2_pca_b       -0.141020
xy_y2_pca_n       18
xy_y2_pca_quality 0.888372
xy_y2_r2          0.477918
xy_y2_corr        0.691316
xy_y2_cov         0.033015
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       18
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       18
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.041397

a                 dog
b                 wye
i                 19
x                 0.4865373244199632
y                 0.44117766146315884
x2                0.23671856805373653
xy                0.2146493990021416
y2                0.1946377289741016
x_y_ols_m         -0.630507
x_y_ols_b         0.809155
x_y_ols_n         19
x_y_pca_m         -1.839104
x_y_pca_b         1.366411
x_y_pca_n         19
x_y_pca_quality   0.695696
x_y_r2            0.218821
x_y_corr          -0.467783
x_y_cov           -0.029041
xy_y2_ols_m       1.290872
xy_y2_ols_b       0.075000
xy_y2_ols_n       19
xy_y2_pca_m       2.393419
xy_y2_pca_b       -0.158220
xy_y2_pca_n       19
xy_y2_pca_quality 0.887359
xy_y2_r2          0.469361
xy_y2_corr        0.685099
xy_y2_cov         0.031153
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       19
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       19
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.039120

a                 dog
b                 dog
i                 20
x                 0.3223311725542929
y                 0.08115611029827985
x2                0.10389738480022534
xy                0.026159144192390068
y2                0.006586314238746564
x_y_ols_m         -0.548880
x_y_ols_b         0.745846
x_y_ols_n         20
x_y_pca_m         -2.251324
x_y_pca_b         1.518994
x_y_pca_n         20
x_y_pca_quality   0.661764
x_y_r2            0.151247
x_y_corr          -0.388905
x_y_cov           -0.024479
xy_y2_ols_m       1.329401
xy_y2_ols_b       0.062098
xy_y2_ols_n       20
xy_y2_pca_m       2.337844
xy_y2_pca_b       -0.141870
xy_y2_pca_n       20
xy_y2_pca_quality 0.894994
xy_y2_r2          0.499340
xy_y2_corr        0.706640
xy_y2_cov         0.032678
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       20
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       20
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.038221

mlr --oxtab stats2 -s -a linreg-ols,linreg-pca,r2,corr,cov -f x,y,xy,y2,x2,x2 -g a,b ./reg_test/input/abixy-wide-short
a                 cat
b                 pan
i                 1
x                 0.5117389009583777
y                 0.08295224980036853
x2                0.2618767027540883
xy                0.0424498931448654
y2                0.006881075746942741
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 pan
b                 wye
i                 2
x                 0.5225940442098578
y                 0.511678736087022
x2                0.27310453504361476
xy                0.2674002600279053
y2                0.26181512896361225
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 wye
b                 cat
i                 3
x                 0.8150401717873625
y                 0.07989551500795256
x2                0.6642904816271734
xy                0.06511805427712146
y2                0.006383293318385972
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 dog
b                 hat
i                 4
x                 0.4488733555675044
y                 0.5730530513123552
x2                0.20148728933843124
xy                0.25722824606077416
y2                0.32838979961840076
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 dog
b                 pan
i                 5
x                 0.2946557960430134
y                 0.6850437256584863
x2                0.08682203814174191
xy                0.20185210430817294
y2                0.46928490606405937
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 wye
b                 cat
i                 6
x                 0.048709182664292916
y                 0.5851879044762575
x2                0.0023725844758234536
xy                0.02850402453206882
y2                0.34244488354531344
x_y_ols_m         -0.659366
x_y_ols_b         0.617305
x_y_ols_n         2
x_y_pca_m         -0.659366
x_y_pca_b         0.617305
x_y_pca_n         2
x_y_pca_quality   1.000000
x_y_r2            1.000000
x_y_corr          -1.000000
x_y_cov           -0.193611
xy_y2_ols_m       -9.178492
xy_y2_ols_b       0.604069
xy_y2_ols_n       2
xy_y2_pca_m       -9.178492
xy_y2_pca_b       0.604069
xy_y2_pca_n       2
xy_y2_pca_quality 1.000000
xy_y2_r2          1.000000
xy_y2_corr        -1.000000
xy_y2_cov         -0.006152
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       2
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       2
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.219068

a                 dog
b                 hat
i                 7
x                 0.8500003149528544
y                 0.2984098741712895
x2                0.7225005354199517
xy                0.25364848703063775
y2                0.08904845300292483
x_y_ols_m         -0.684679
x_y_ols_b         0.880387
x_y_ols_n         2
x_y_pca_m         -0.684679
x_y_pca_b         0.880387
x_y_pca_n         2
x_y_pca_quality   1.000000
x_y_r2            1.000000
x_y_corr          -1.000000
x_y_cov           -0.055083
xy_y2_ols_m       66.859625
xy_y2_ols_b       -16.869794
xy_y2_ols_n       2
xy_y2_pca_m       66.859625
xy_y2_pca_b       -16.869794
xy_y2_pca_n       2
xy_y2_pca_quality 1.000000
xy_y2_r2          1.000000
xy_y2_corr        1.000000
xy_y2_cov         0.000428
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       2
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       2
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.135727

a                 pan
b                 pan
i                 8
x                 0.616507208914765
y                 0.25924335982487057
x2                0.38008113864387366
xy                0.15982540019531707
y2                0.06720711961328732
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 hat
b                 hat
i                 9
x                 0.33786884067769307
y                 0.6036735617015514
x2                0.11415535350088835
xy                0.203962486439877
y2                0.3644217690974368
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 wye
b                 hat
i                 10
x                 0.3834648944206174
y                 0.4999709279216641
x2                0.14704532525301522
xy                0.19172129908885902
y2                0.24997092876684981
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 pan
b                 hat
i                 11
x                 0.025474999754416028
y                 0.7861954915044592
x2                0.0006489756124874967
xy                0.020028329952999087
y2                0.6181033508619382
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 cat
b                 hat
i                 12
x                 0.6335445699880142
y                 0.15467178563525052
x2                0.4013787221612979
xy                0.0979914699195631
y2                0.02392336127159689
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 hat
b                 wye
i                 13
x                 0.35922068401384877
y                 0.8502678133887914
x2                0.1290394998233774
xy                0.30543378552048117
y2                0.7229553544849566
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 dog
b                 dog
i                 14
x                 0.5440047442770544
y                 0.933608851612059
x2                0.2959411617959433
xy                0.5078876445760125
y2                0.8716254878083876
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 wye
b                 dog
i                 15
x                 0.4689175303764642
y                 0.09048353045392021
x2                0.21988365029436224
xy                0.04242931364019586
y2                0.008187269283405506
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 pan
b                 pan
i                 16
x                 0.3959177828066379
y                 0.6339858483805666
x2                0.15675089074252413
xy                0.25100627142161924
y2                0.4019380559468268
x_y_ols_m         -1.698823
x_y_ols_b         1.306580
x_y_ols_n         2
x_y_pca_m         -1.698823
x_y_pca_b         1.306580
x_y_pca_n         2
x_y_pca_quality   1.000000
x_y_r2            1.000000
x_y_corr          -1.000000
x_y_cov           -0.041332
xy_y2_ols_m       3.671065
xy_y2_ols_b       -0.519522
xy_y2_ols_n       2
xy_y2_pca_m       3.671065
xy_y2_pca_b       -0.519522
xy_y2_pca_n       2
xy_y2_pca_quality 1.000000
xy_y2_r2          1.000000
xy_y2_corr        1.000000
xy_y2_cov         0.015261
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       2
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       2
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.024938

a                 dog
b                 hat
i                 17
x                 0.34033844788864975
y                 0.8845934733681523
x2                0.11583025911125516
xy                0.3010611697385466
y2                0.782505613125532
x_y_ols_m         -1.023812
x_y_ols_b         1.144767
x_y_ols_n         3
x_y_pca_m         -1.098934
x_y_pca_b         1.185814
x_y_pca_n         3
x_y_pca_quality   0.967833
x_y_r2            0.878279
x_y_corr          -0.937166
x_y_cov           -0.073789
xy_y2_ols_m       12.826246
xy_y2_ols_b       -3.071390
xy_y2_ols_n       3
xy_y2_pca_m       13.871436
xy_y2_pca_b       -3.354267
xy_y2_pca_n       3
xy_y2_pca_quality 0.999579
xy_y2_r2          0.924260
xy_y2_corr        0.961385
xy_y2_cov         0.008940
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       3
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       3
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.107807

a                 wye
b                 wye
i                 18
x                 0.6770613653962891
y                 0.896307226056897
x2                0.4584120925122874
xy                0.6068549942886431
y2                0.8033666434818095
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 dog
b                 wye
i                 19
x                 0.4865373244199632
y                 0.44117766146315884
x2                0.23671856805373653
xy                0.2146493990021416
y2                0.1946377289741016
x_y_ols_m         
x_y_ols_b         
x_y_ols_n         1
x_y_pca_m         
x_y_pca_b         
x_y_pca_n         
x_y_pca_quality   
x_y_r2            
x_y_corr          
x_y_cov           
xy_y2_ols_m       
xy_y2_ols_b       
xy_y2_ols_n       1
xy_y2_pca_m       
xy_y2_pca_b       
xy_y2_pca_n       
xy_y2_pca_quality 
xy_y2_r2          
xy_y2_corr        
xy_y2_cov         
x2_x2_ols_m       
x2_x2_ols_b       
x2_x2_ols_n       1
x2_x2_pca_m       
x2_x2_pca_b       
x2_x2_pca_n       
x2_x2_pca_quality 
x2_x2_r2          
x2_x2_corr        
x2_x2_cov         

a                 dog
b                 dog
i                 20
x                 0.3223311725542929
y                 0.08115611029827985
x2                0.10389738480022534
xy                0.026159144192390068
y2                0.006586314238746564
x_y_ols_m         3.845532
x_y_ols_b         -1.158379
x_y_ols_n         2
x_y_pca_m         3.845532
x_y_pca_b         -1.158379
x_y_pca_n         2
x_y_pca_quality   1.000000
x_y_r2            1.000000
x_y_corr          1.000000
x_y_cov           0.094483
xy_y2_ols_m       1.795699
xy_y2_ols_b       -0.040388
xy_y2_ols_n       2
xy_y2_pca_m       1.795699
xy_y2_pca_b       -0.040388
xy_y2_pca_n       2
xy_y2_pca_quality 1.000000
xy_y2_r2          1.000000
xy_y2_corr        1.000000
xy_y2_cov         0.208357
x2_x2_ols_m       1.000000
x2_x2_ols_b       0.000000
x2_x2_ols_n       2
x2_x2_pca_m       1.000000
x2_x2_pca_b       0.000000
x2_x2_pca_n       2
x2_x2_pca_quality 1.000000
x2_x2_r2          1.000000
x2_x2_corr        1.000000
x2_x2_cov         0.018440

mlr --opprint stats2 --fit -a linreg-ols,linreg-pca -f x,y,xy,y2,x2,x2 ./reg_test/input/abixy-wide-short
a   b   i  x                    y                   x2                    xy                   y2                   x_y_ols_fit x_y_pca_fit xy_y2_ols_fit xy_y2_pca_fit x2_x2_ols_fit x2_x2_pca_fit
cat pan 1  0.5117389009583777   0.08295224980036853 0.2618767027540883    0.0424498931448654   0.006881075746942741 0.464963    0.366904    0.118531      -0.042629     0.261877      0.261877
pan wye 2  0.5225940442098578   0.511678736087022   0.27310453504361476   0.2674002600279053   0.26181512896361225  0.459005    0.342466    0.417581      0.483270      0.273105      0.273105
wye cat 3  0.8150401717873625   0.07989551500795256 0.6642904816271734    0.06511805427712146  0.006383293318385972 0.298487    -0.315925   0.148666      0.010366      0.664290      0.664290
dog hat 4  0.4488733555675044   0.5730530513123552  0.20148728933843124   0.25722824606077416  0.32838979961840076  0.499469    0.508435    0.404058      0.459490      0.201487      0.201487
dog pan 5  0.2946557960430134   0.6850437256584863  0.08682203814174191   0.20185210430817294  0.46928490606405937  0.584116    0.855629    0.330441      0.330029      0.086822      0.086822
wye cat 6  0.048709182664292916 0.5851879044762575  0.0023725844758234536 0.02850402453206882  0.34244488354531344  0.719111    1.409334    0.099992      -0.075232     0.002373      0.002373
dog hat 7  0.8500003149528544   0.2984098741712895  0.7225005354199517    0.25364848703063775  0.08904845300292483  0.279298    -0.394632   0.399299      0.451121      0.722501      0.722501
pan pan 8  0.616507208914765    0.25924335982487057 0.38008113864387366   0.15982540019531707  0.06720711961328732  0.407458    0.131037    0.274570      0.231777      0.380081      0.380081
hat hat 9  0.33786884067769307  0.6036735617015514  0.11415535350088835   0.203962486439877    0.3644217690974368   0.560397    0.758342    0.333246      0.334963      0.114155      0.114155
wye hat 10 0.3834648944206174   0.4999709279216641  0.14704532525301522   0.19172129908885902  0.24997092876684981  0.535370    0.655691    0.316973      0.306345      0.147045      0.147045
pan hat 11 0.025474999754416028 0.7861954915044592  0.0006489756124874967 0.020028329952999087 0.6181033508619382   0.731863    1.461642    0.088724      -0.095047     0.000649      0.000649
cat hat 12 0.6335445699880142   0.15467178563525052 0.4013787221612979    0.0979914699195631   0.02392336127159689  0.398106    0.092680    0.192368      0.087219      0.401379      0.401379
hat wye 13 0.35922068401384877  0.8502678133887914  0.1290394998233774    0.30543378552048117  0.7229553544849566   0.548677    0.710272    0.468142      0.572187      0.129039      0.129039
dog dog 14 0.5440047442770544   0.933608851612059   0.2959411617959433    0.5078876445760125   0.8716254878083876   0.447253    0.294263    0.737285      1.045492      0.295941      0.295941
wye dog 15 0.4689175303764642   0.09048353045392021 0.21988365029436224   0.04242931364019586  0.008187269283405506 0.488467    0.463309    0.118504      -0.042677     0.219884      0.219884
pan pan 16 0.3959177828066379   0.6339858483805666  0.15675089074252413   0.25100627142161924  0.4019380559468268   0.528535    0.627655    0.395786      0.444944      0.156751      0.156751
dog hat 17 0.34033844788864975  0.8845934733681523  0.11583025911125516   0.3010611697385466   0.782505613125532    0.559041    0.752782    0.462329      0.561964      0.115830      0.115830
wye wye 18 0.6770613653962891   0.896307226056897   0.4584120925122874    0.6068549942886431   0.8033666434818095   0.374221    -0.005290   0.868852      1.276863      0.458412      0.458412
dog wye 19 0.4865373244199632   0.44117766146315884 0.23671856805373653   0.2146493990021416   0.1946377289741016   0.478796    0.423641    0.347454      0.359947      0.236719      0.236719
dog dog 20 0.3223311725542929   0.08115611029827985 0.10389738480022534   0.026159144192390068 0.006586314238746564 0.568925    0.793322    0.096874      -0.080714     0.103897      0.103897

mlr --opprint stats2 --fit -a linreg-ols,linreg-pca -f x,y,xy,y2,x2,x2 -g a ./reg_test/input/abixy-wide-short
a   b   i  x                    y                   x2                    xy                   y2                   x_y_ols_fit x_y_pca_fit xy_y2_ols_fit xy_y2_pca_fit x2_x2_ols_fit x2_x2_pca_fit
cat pan 1  0.5117389009583777   0.08295224980036853 0.2618767027540883    0.0424498931448654   0.006881075746942741 0.082952    0.082952    0.006881      0.006881      0.261877      0.261877
cat hat 12 0.6335445699880142   0.15467178563525052 0.4013787221612979    0.0979914699195631   0.02392336127159689  0.154672    0.154672    0.023923      0.023923      0.401379      0.401379
pan wye 2  0.5225940442098578   0.511678736087022   0.27310453504361476   0.2674002600279053   0.26181512896361225  0.445016    0.435835    0.237402      0.033364      0.273105      0.273105
pan pan 8  0.616507208914765    0.25924335982487057 0.38008113864387366   0.15982540019531707  0.06720711961328732  0.372165    0.356477    0.353122      0.385517      0.380081      0.380081
pan hat 11 0.025474999754416028 0.7861954915044592  0.0006489756124874967 0.020028329952999087 0.6181033508619382   0.830642    0.855912    0.503503      0.843152      0.000649      0.000649
pan pan 16 0.3959177828066379   0.6339858483805666  0.15675089074252413   0.25100627142161924  0.4019380559468268   0.543281    0.542880    0.255037      0.087031      0.156751      0.156751
wye cat 3  0.8150401717873625   0.07989551500795256 0.6642904816271734    0.06511805427712146  0.006383293318385972 0.337827    -0.227660   0.137066      0.112494      0.664290      0.664290
wye cat 6  0.048709182664292916 0.5851879044762575  0.0023725844758234536 0.02850402453206882  0.34244488354531344  0.548640    1.271347    0.093480      0.061521      0.002373      0.002373
wye hat 10 0.3834648944206174   0.4999709279216641  0.14704532525301522   0.19172129908885902  0.24997092876684981  0.456551    0.616537    0.287780      0.288747      0.147045      0.147045
wye dog 15 0.4689175303764642   0.09048353045392021 0.21988365029436224   0.04242931364019586  0.008187269283405506 0.433043    0.449384    0.110057      0.080907      0.219884      0.219884
wye wye 18 0.6770613653962891   0.896307226056897   0.4584120925122874    0.6068549942886431   0.8033666434818095   0.375784    0.042238    0.781971      0.866684      0.458412      0.458412
dog hat 4  0.4488733555675044   0.5730530513123552  0.20148728933843124   0.25722824606077416  0.32838979961840076  0.563043    0.668750    0.401991      0.406622      0.201487      0.201487
dog pan 5  0.2946557960430134   0.6850437256584863  0.08682203814174191   0.20185210430817294  0.46928490606405937  0.610235    1.504956    0.297579      0.255112      0.086822      0.086822
dog hat 7  0.8500003149528544   0.2984098741712895  0.7225005354199517    0.25364848703063775  0.08904845300292483  0.440294    -1.506261   0.395241      0.396827      0.722501      0.722501
dog dog 14 0.5440047442770544   0.933608851612059   0.2959411617959433    0.5078876445760125   0.8716254878083876   0.533932    0.152924    0.874610      1.092430      0.295941      0.295941
dog hat 17 0.34033844788864975  0.8845934733681523  0.11583025911125516   0.3010611697385466   0.782505613125532    0.596256    1.257254    0.484638      0.526549      0.115830      0.115830
dog wye 19 0.4865373244199632   0.44117766146315884 0.23671856805373653   0.2146493990021416   0.1946377289741016   0.551517    0.464527    0.321709      0.290125      0.236719      0.236719
dog dog 20 0.3223311725542929   0.08115611029827985 0.10389738480022534   0.026159144192390068 0.006586314238746564 0.601766    1.354893    -0.033690     -0.225587     0.103897      0.103897
hat hat 9  0.33786884067769307  0.6036735617015514  0.11415535350088835   0.203962486439877    0.3644217690974368   0.603674    0.603674    0.364422      0.364422      0.114155      0.114155
hat wye 13 0.35922068401384877  0.8502678133887914  0.1290394998233774    0.30543378552048117  0.7229553544849566   0.850268    0.850268    0.722955      0.722955      0.129039      0.129039

mlr --opprint stats2 -a logireg -f x,y ./reg_test/input/logi.dkvp
x_y_logistic_m x_y_logistic_b x_y_logistic_n
0.145457       0.145449       22

mlr --opprint stats2 -a logireg -f x,y -g g ./reg_test/input/logi.dkvp
g    x_y_logistic_m x_y_logistic_b x_y_logistic_n
red  0.145458       -0.036371      11
blue 0.145457       0.327269       11

mlr --oxtab stats2 -a cov -f x,y ./reg_test/input/abixy-het
x_y_cov -0.011481

mlr --oxtab stats2 -a cov -f x,y -g a ./reg_test/input/abixy-het
a       pan
x_y_cov 0.017595

a       eks
x_y_cov 0.034641

a       wye
x_y_cov 

a       zee
x_y_cov 

mlr --opprint step -a rsum,delta,counter -f x,y ./reg_test/input/abixy
a   b   i  x                   y                   x_rsum   x_delta   x_counter y_rsum   y_delta   y_counter
pan pan 1  0.3467901443380824  0.7268028627434533  0.346790 0         1         0.726803 0         1
eks pan 2  0.7586799647899636  0.5221511083334797  1.105470 0.411890  2         1.248954 -0.204652 2
wye wye 3  0.20460330576630303 0.33831852551664776 1.310073 -0.554077 3         1.587272 -0.183833 3
eks wye 4  0.38139939387114097 0.13418874328430463 1.691473 0.176796  4         1.721461 -0.204130 4
wye pan 5  0.5732889198020006  0.8636244699032729  2.264762 0.191890  5         2.585086 0.729436  5
zee pan 6  0.5271261600918548  0.49322128674835697 2.791888 -0.046163 6         3.078307 -0.370403 6
eks zee 7  0.6117840605678454  0.1878849191181694  3.403672 0.084658  7         3.266192 -0.305336 7
zee wye 8  0.5985540091064224  0.976181385699006   4.002226 -0.013230 8         4.242373 0.788296  8
hat wye 9  0.03144187646093577 0.7495507603507059  4.033668 -0.567112 9         4.991924 -0.226631 9
pan wye 10 0.5026260055412137  0.9526183602969864  4.536294 0.471184  10        5.944542 0.203068  10

mlr --opprint step -a rsum,delta,counter -f x,y -g a ./reg_test/input/abixy
a   b   i  x                   y                   x_rsum   x_delta   x_counter y_rsum   y_delta   y_counter
pan pan 1  0.3467901443380824  0.7268028627434533  0.346790 0         1         0.726803 0         1
eks pan 2  0.7586799647899636  0.5221511083334797  0.758680 0         1         0.522151 0         1
wye wye 3  0.20460330576630303 0.33831852551664776 0.204603 0         1         0.338319 0         1
eks wye 4  0.38139939387114097 0.13418874328430463 1.140079 -0.377281 2         0.656340 -0.387962 2
wye pan 5  0.5732889198020006  0.8636244699032729  0.777892 0.368686  2         1.201943 0.525306  2
zee pan 6  0.5271261600918548  0.49322128674835697 0.527126 0         1         0.493221 0         1
eks zee 7  0.6117840605678454  0.1878849191181694  1.751863 0.230385  3         0.844225 0.053696  3
zee wye 8  0.5985540091064224  0.976181385699006   1.125680 0.071428  2         1.469403 0.482960  2
hat wye 9  0.03144187646093577 0.7495507603507059  0.031442 0         1         0.749551 0         1
pan wye 10 0.5026260055412137  0.9526183602969864  0.849416 0.155836  2         1.679421 0.225815  2

mlr --odkvp step -a rsum,delta,counter -f x,y ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,x_rsum=0.346790,x_delta=0,x_counter=1,y_rsum=0.726803,y_delta=0,y_counter=1
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,x_rsum=1.105470,x_delta=0.411890,x_counter=2,y_rsum=1.248954,y_delta=-0.204652,y_counter=2
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,x_rsum=1.310073,x_delta=-0.554077,x_counter=3,y_rsum=1.587272,y_delta=-0.183833,y_counter=3
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,x_rsum=1.691473,x_delta=0.176796,x_counter=4,y_rsum=1.721461,y_delta=-0.204130,y_counter=4
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,y_rsum=2.585086,y_delta=0.729436,y_counter=5
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,x_rsum=2.218599,x_delta=0.145727,x_counter=5,y_rsum=3.078307,y_delta=-0.370403,y_counter=6
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,x_rsum=2.830383,x_delta=0.084658,x_counter=6,y_rsum=3.266192,y_delta=-0.305336,y_counter=7
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,x_rsum=3.428937,x_delta=-0.013230,x_counter=7
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,x_rsum=3.460379,x_delta=-0.567112,x_counter=8,y_rsum=4.015743,y_delta=0.561666,y_counter=8
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,x_rsum=3.963005,x_delta=0.471184,x_counter=9,y_rsum=4.968361,y_delta=0.203068,y_counter=9

mlr --odkvp step -a rsum,delta,counter -f x,y -g a ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,x_rsum=0.346790,x_delta=0,x_counter=1,y_rsum=0.726803,y_delta=0,y_counter=1
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,x_rsum=0.758680,x_delta=0,x_counter=1,y_rsum=0.522151,y_delta=0,y_counter=1
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,x_rsum=1.140079,x_delta=-0.377281,x_counter=2,y_rsum=0.656340,y_delta=-0.387962,y_counter=2
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,y_rsum=0.863624,y_delta=0,y_counter=1
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,x_rsum=0.527126,x_delta=0,x_counter=1,y_rsum=0.493221,y_delta=0,y_counter=1
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,x_rsum=1.751863,x_delta=0.230385,x_counter=3,y_rsum=0.844225,y_delta=0.053696,y_counter=3
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,x_rsum=1.125680,x_delta=0.071428,x_counter=2
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,x_rsum=0.849416,x_delta=0.155836,x_counter=2,y_rsum=1.679421,y_delta=0.225815,y_counter=2

mlr --icsvlite --opprint step -a from-first -f x ./reg_test/input/from-first.csv
x   g     x_from_first
100 red   0
203 red   103
101 green 1
307 red   207
209 green 109
314 green 214

mlr --icsvlite --opprint step -a from-first -f x -g g ./reg_test/input/from-first.csv
x   g     x_from_first
100 red   0
203 red   103
101 green 0
307 red   207
209 green 108
314 green 213

mlr --opprint histogram -f x,y --lo 0 --hi 1 --nbins 20 ./reg_test/input/small
bin_lo   bin_hi   x_count y_count
0.000000 0.050000 1       0
0.050000 0.100000 0       0
0.100000 0.150000 0       1
0.150000 0.200000 0       1
0.200000 0.250000 1       0
0.250000 0.300000 0       0
0.300000 0.350000 1       1
0.350000 0.400000 1       0
0.400000 0.450000 0       0
0.450000 0.500000 0       1
0.500000 0.550000 2       1
0.550000 0.600000 2       0
0.600000 0.650000 1       0
0.650000 0.700000 0       0
0.700000 0.750000 0       2
0.750000 0.800000 1       0
0.800000 0.850000 0       0
0.850000 0.900000 0       1
0.900000 0.950000 0       0
0.950000 1.000000 0       2


================================================================
DSL OPERATOR ASSOCIATIVITY

mlr put -v $x = 1 || 2 || 3 /dev/null
= (operator):
    x (field_name).
    || (operator):
        || (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 || 2 || 3 /dev/null
|| (operator):
    || (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ^^ 2 ^^ 3 /dev/null
= (operator):
    x (field_name).
    ^^ (operator):
        ^^ (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ^^ 2 ^^ 3 /dev/null
^^ (operator):
    ^^ (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 && 2 && 3 /dev/null
= (operator):
    x (field_name).
    && (operator):
        && (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 && 2 && 3 /dev/null
&& (operator):
    && (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  == 2  == 3 /dev/null
= (operator):
    x (field_name).
    == (operator):
        == (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  == 2  == 3 /dev/null
== (operator):
    == (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  != 2  != 3 /dev/null
= (operator):
    x (field_name).
    != (operator):
        != (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  != 2  != 3 /dev/null
!= (operator):
    != (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  =~ 2  =~ 3 /dev/null
= (operator):
    x (field_name).
    =~ (operator):
        =~ (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  =~ 2  =~ 3 /dev/null
=~ (operator):
    =~ (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 !=~ 2 !=~ 3 /dev/null
= (operator):
    x (field_name).
    !=~ (operator):
        !=~ (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 !=~ 2 !=~ 3 /dev/null
!=~ (operator):
    !=~ (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  == 2  != 3 /dev/null
= (operator):
    x (field_name).
    != (operator):
        == (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  == 2  != 3 /dev/null
!= (operator):
    == (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  != 2  == 3 /dev/null
= (operator):
    x (field_name).
    == (operator):
        != (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  != 2  == 3 /dev/null
== (operator):
    != (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  <  2  <  3 /dev/null
= (operator):
    x (field_name).
    < (operator):
        < (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  <  2  <  3 /dev/null
< (operator):
    < (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  <= 2  <= 3 /dev/null
= (operator):
    x (field_name).
    <= (operator):
        <= (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  <= 2  <= 3 /dev/null
<= (operator):
    <= (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  >  2  >  3 /dev/null
= (operator):
    x (field_name).
    > (operator):
        > (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  >  2  >  3 /dev/null
> (operator):
    > (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  >= 2  >= 3 /dev/null
= (operator):
    x (field_name).
    >= (operator):
        >= (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  >= 2  >= 3 /dev/null
>= (operator):
    >= (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  <  2  <= 3 /dev/null
= (operator):
    x (field_name).
    <= (operator):
        < (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  <  2  <= 3 /dev/null
<= (operator):
    < (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  <= 2  <  3 /dev/null
= (operator):
    x (field_name).
    < (operator):
        <= (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  <= 2  <  3 /dev/null
< (operator):
    <= (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 |  2 |  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        | (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 |  2 |  3 /dev/null
| (operator):
    | (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ^  2 ^  3 /dev/null
= (operator):
    x (field_name).
    ^ (operator):
        ^ (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ^  2 ^  3 /dev/null
^ (operator):
    ^ (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 &  2 &  3 /dev/null
= (operator):
    x (field_name).
    & (operator):
        & (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 &  2 &  3 /dev/null
& (operator):
    & (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 |  2 &  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        1 (literal).
        & (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 |  2 &  3 /dev/null
| (operator):
    1 (literal).
    & (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 |  2 ^  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        1 (literal).
        ^ (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 |  2 ^  3 /dev/null
| (operator):
    1 (literal).
    ^ (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 ^  2 |  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        ^ (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ^  2 |  3 /dev/null
| (operator):
    ^ (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ^  2 &  3 /dev/null
= (operator):
    x (field_name).
    ^ (operator):
        1 (literal).
        & (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 ^  2 &  3 /dev/null
^ (operator):
    1 (literal).
    & (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 &  2 |  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        & (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 &  2 |  3 /dev/null
| (operator):
    & (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 &  2 ^  3 /dev/null
= (operator):
    x (field_name).
    ^ (operator):
        & (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 &  2 ^  3 /dev/null
^ (operator):
    & (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  << 2  << 3 /dev/null
= (operator):
    x (field_name).
    << (operator):
        << (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  << 2  << 3 /dev/null
<< (operator):
    << (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  >> 2  >> 3 /dev/null
= (operator):
    x (field_name).
    >> (operator):
        >> (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  >> 2  >> 3 /dev/null
>> (operator):
    >> (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  << 2  >> 3 /dev/null
= (operator):
    x (field_name).
    >> (operator):
        << (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  << 2  >> 3 /dev/null
>> (operator):
    << (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1  >> 2  << 3 /dev/null
= (operator):
    x (field_name).
    << (operator):
        >> (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1  >> 2  << 3 /dev/null
<< (operator):
    >> (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 + 2 + 3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        + (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 + 2 + 3 /dev/null
+ (operator):
    + (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 - 2 - 3 /dev/null
= (operator):
    x (field_name).
    - (operator):
        - (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 - 2 - 3 /dev/null
- (operator):
    - (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 + 2 - 3 /dev/null
= (operator):
    x (field_name).
    - (operator):
        + (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 + 2 - 3 /dev/null
- (operator):
    + (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 - 2 + 3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        - (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 - 2 + 3 /dev/null
+ (operator):
    - (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 . 2 . 3 /dev/null
= (operator):
    x (field_name).
    . (operator):
        . (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 . 2 . 3 /dev/null
. (operator):
    . (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 * 2 * 3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        * (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 * 2 * 3 /dev/null
* (operator):
    * (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 / 2 / 3 /dev/null
= (operator):
    x (field_name).
    / (operator):
        / (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 / 2 / 3 /dev/null
/ (operator):
    / (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 // 2 // 3 /dev/null
= (operator):
    x (field_name).
    // (operator):
        // (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 // 2 // 3 /dev/null
// (operator):
    // (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 % 2 % 3 /dev/null
= (operator):
    x (field_name).
    % (operator):
        % (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 % 2 % 3 /dev/null
% (operator):
    % (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ** 2 ** 3 /dev/null
= (operator):
    x (field_name).
    ** (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 ** 2 ** 3 /dev/null
** (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 *  2 /  3 /dev/null
= (operator):
    x (field_name).
    / (operator):
        * (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 *  2 /  3 /dev/null
/ (operator):
    * (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 *  2 // 3 /dev/null
= (operator):
    x (field_name).
    // (operator):
        * (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 *  2 // 3 /dev/null
// (operator):
    * (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 *  2 %  3 /dev/null
= (operator):
    x (field_name).
    % (operator):
        * (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 *  2 %  3 /dev/null
% (operator):
    * (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 *  2 ** 3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 *  2 ** 3 /dev/null
* (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 /  2 *  3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        / (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 /  2 *  3 /dev/null
* (operator):
    / (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 /  2 // 3 /dev/null
= (operator):
    x (field_name).
    // (operator):
        / (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 /  2 // 3 /dev/null
// (operator):
    / (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 /  2 %  3 /dev/null
= (operator):
    x (field_name).
    % (operator):
        / (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 /  2 %  3 /dev/null
% (operator):
    / (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 /  2 ** 3 /dev/null
= (operator):
    x (field_name).
    / (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 /  2 ** 3 /dev/null
/ (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 // 2 *  3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        // (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 // 2 *  3 /dev/null
* (operator):
    // (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 // 2 /  3 /dev/null
= (operator):
    x (field_name).
    / (operator):
        // (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 // 2 /  3 /dev/null
/ (operator):
    // (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 // 2 %  3 /dev/null
= (operator):
    x (field_name).
    % (operator):
        // (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 // 2 %  3 /dev/null
% (operator):
    // (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 // 2 ** 3 /dev/null
= (operator):
    x (field_name).
    // (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 // 2 ** 3 /dev/null
// (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 %  2 *  3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        % (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 %  2 *  3 /dev/null
* (operator):
    % (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 %  2 /  3 /dev/null
= (operator):
    x (field_name).
    / (operator):
        % (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 %  2 /  3 /dev/null
/ (operator):
    % (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 %  2 // 3 /dev/null
= (operator):
    x (field_name).
    // (operator):
        % (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 %  2 // 3 /dev/null
// (operator):
    % (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 %  2 ** 3 /dev/null
= (operator):
    x (field_name).
    % (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 %  2 ** 3 /dev/null
% (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 ** 2 *  3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ** 2 *  3 /dev/null
* (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ** 2 /  3 /dev/null
= (operator):
    x (field_name).
    / (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ** 2 /  3 /dev/null
/ (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ** 2 // 3 /dev/null
= (operator):
    x (field_name).
    // (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ** 2 // 3 /dev/null
// (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ** 2 %  3 /dev/null
= (operator):
    x (field_name).
    % (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ** 2 %  3 /dev/null
% (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = ++1 /dev/null
= (operator):
    x (field_name).
    + (operator):
        + (operator):
            1 (literal).

mlr filter -v      ++1 /dev/null
+ (operator):
    + (operator):
        1 (literal).

mlr put -v $x = --1 /dev/null
= (operator):
    x (field_name).
    - (operator):
        - (operator):
            1 (literal).

mlr filter -v      --1 /dev/null
- (operator):
    - (operator):
        1 (literal).

mlr put -v $x = !!1 /dev/null
= (operator):
    x (field_name).
    ! (operator):
        ! (operator):
            1 (literal).

mlr filter -v      !!1 /dev/null
! (operator):
    ! (operator):
        1 (literal).

mlr put -v $x = ~~1 /dev/null
= (operator):
    x (field_name).
    ~ (operator):
        ~ (operator):
            1 (literal).

mlr filter -v      ~~1 /dev/null
~ (operator):
    ~ (operator):
        1 (literal).


================================================================
DSL OPERATOR PRECEDENCE

mlr put -v $x = 1 || 2 ^^ 3 /dev/null
= (operator):
    x (field_name).
    || (operator):
        1 (literal).
        ^^ (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 || 2 ^^ 3 /dev/null
|| (operator):
    1 (literal).
    ^^ (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 || 2 && 3 /dev/null
= (operator):
    x (field_name).
    || (operator):
        1 (literal).
        && (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 || 2 && 3 /dev/null
|| (operator):
    1 (literal).
    && (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 ^^ 2 || 3 /dev/null
= (operator):
    x (field_name).
    || (operator):
        ^^ (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 ^^ 2 || 3 /dev/null
|| (operator):
    ^^ (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 ^^ 2 && 3 /dev/null
= (operator):
    x (field_name).
    ^^ (operator):
        1 (literal).
        && (operator):
            2 (literal).
            3 (literal).

mlr filter -v      1 ^^ 2 && 3 /dev/null
^^ (operator):
    1 (literal).
    && (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = 1 && 2 || 3 /dev/null
= (operator):
    x (field_name).
    || (operator):
        && (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 && 2 || 3 /dev/null
|| (operator):
    && (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = 1 && 2 ^^ 3 /dev/null
= (operator):
    x (field_name).
    ^^ (operator):
        && (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      1 && 2 ^^ 3 /dev/null
^^ (operator):
    && (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 == 2 <= 3 /dev/null
= (operator):
    x (field_name).
    == (operator):
        1 (literal).
        <= (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 == 2 <= 3 /dev/null
== (operator):
    1 (literal).
    <= (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 <= 2 == 3 /dev/null
= (operator):
    x (field_name).
    == (operator):
        <= (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 <= 2 == 3 /dev/null
== (operator):
    <= (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 <= 2 |  3 /dev/null
= (operator):
    x (field_name).
    <= (operator):
        1 (literal).
        | (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 <= 2 |  3 /dev/null
<= (operator):
    1 (literal).
    | (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 |  2 <= 3 /dev/null
= (operator):
    x (field_name).
    <= (operator):
        | (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 |  2 <= 3 /dev/null
<= (operator):
    | (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 |  2 ^  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        1 (literal).
        ^ (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 |  2 ^  3 /dev/null
| (operator):
    1 (literal).
    ^ (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 ^  2 |  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        ^ (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 ^  2 |  3 /dev/null
| (operator):
    ^ (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 ^  2 &  3 /dev/null
= (operator):
    x (field_name).
    ^ (operator):
        1 (literal).
        & (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 ^  2 &  3 /dev/null
^ (operator):
    1 (literal).
    & (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 &  2 ^  3 /dev/null
= (operator):
    x (field_name).
    ^ (operator):
        & (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 &  2 ^  3 /dev/null
^ (operator):
    & (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 &  2 << 3 /dev/null
= (operator):
    x (field_name).
    & (operator):
        1 (literal).
        << (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 &  2 << 3 /dev/null
& (operator):
    1 (literal).
    << (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 << 2 &  3 /dev/null
= (operator):
    x (field_name).
    & (operator):
        << (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 << 2 &  3 /dev/null
& (operator):
    << (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 +  2 * 3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        1 (literal).
        * (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 +  2 * 3 /dev/null
+ (operator):
    1 (literal).
    * (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 *  2 + 3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        * (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 *  2 + 3 /dev/null
+ (operator):
    * (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 + (2 * 3) /dev/null
= (operator):
    x (field_name).
    + (operator):
        1 (literal).
        * (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 + (2 * 3) /dev/null
+ (operator):
    1 (literal).
    * (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 * (2 + 3) /dev/null
= (operator):
    x (field_name).
    * (operator):
        1 (literal).
        + (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 * (2 + 3) /dev/null
* (operator):
    1 (literal).
    + (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = (1 + 2) * 3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        + (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      (1 + 2) * 3 /dev/null
* (operator):
    + (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = (1 * 2) + 3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        * (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      (1 * 2) + 3 /dev/null
+ (operator):
    * (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 +   2 ** 3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 +   2 ** 3 /dev/null
+ (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 **  2 +  3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 **  2 +  3 /dev/null
+ (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 +  (2 ** 3) /dev/null
= (operator):
    x (field_name).
    + (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 +  (2 ** 3) /dev/null
+ (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 ** (2 +  3) /dev/null
= (operator):
    x (field_name).
    ** (operator):
        1 (literal).
        + (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 ** (2 +  3) /dev/null
** (operator):
    1 (literal).
    + (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = (1 +  2) ** 3 /dev/null
= (operator):
    x (field_name).
    ** (operator):
        + (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      (1 +  2) ** 3 /dev/null
** (operator):
    + (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = (1 ** 2) +  3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      (1 ** 2) +  3 /dev/null
+ (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 *   2 ** 3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 *   2 ** 3 /dev/null
* (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 **  2 *  3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v       1 **  2 *  3 /dev/null
* (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 *  (2 ** 3) /dev/null
= (operator):
    x (field_name).
    * (operator):
        1 (literal).
        ** (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 *  (2 ** 3) /dev/null
* (operator):
    1 (literal).
    ** (operator):
        2 (literal).
        3 (literal).

mlr put -v $x =  1 ** (2 *  3) /dev/null
= (operator):
    x (field_name).
    ** (operator):
        1 (literal).
        * (operator):
            2 (literal).
            3 (literal).

mlr filter -v       1 ** (2 *  3) /dev/null
** (operator):
    1 (literal).
    * (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = (1 *  2) ** 3 /dev/null
= (operator):
    x (field_name).
    ** (operator):
        * (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      (1 *  2) ** 3 /dev/null
** (operator):
    * (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = (1 ** 2) *  3 /dev/null
= (operator):
    x (field_name).
    * (operator):
        ** (operator):
            1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      (1 ** 2) *  3 /dev/null
* (operator):
    ** (operator):
        1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x = -1 +  2 *  3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        - (operator):
            1 (literal).
        * (operator):
            2 (literal).
            3 (literal).

mlr filter -v      -1 +  2 *  3 /dev/null
+ (operator):
    - (operator):
        1 (literal).
    * (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = -1 *  2 +  3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        * (operator):
            - (operator):
                1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      -1 *  2 +  3 /dev/null
+ (operator):
    * (operator):
        - (operator):
            1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 + -2 *  3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        1 (literal).
        * (operator):
            - (operator):
                2 (literal).
            3 (literal).

mlr filter -v       1 + -2 *  3 /dev/null
+ (operator):
    1 (literal).
    * (operator):
        - (operator):
            2 (literal).
        3 (literal).

mlr put -v $x =  1 * -2 +  3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        * (operator):
            1 (literal).
            - (operator):
                2 (literal).
        3 (literal).

mlr filter -v       1 * -2 +  3 /dev/null
+ (operator):
    * (operator):
        1 (literal).
        - (operator):
            2 (literal).
    3 (literal).

mlr put -v $x =  1 +  2 * -3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        1 (literal).
        * (operator):
            2 (literal).
            - (operator):
                3 (literal).

mlr filter -v       1 +  2 * -3 /dev/null
+ (operator):
    1 (literal).
    * (operator):
        2 (literal).
        - (operator):
            3 (literal).

mlr put -v $x =  1 *  2 + -3 /dev/null
= (operator):
    x (field_name).
    + (operator):
        * (operator):
            1 (literal).
            2 (literal).
        - (operator):
            3 (literal).

mlr filter -v       1 *  2 + -3 /dev/null
+ (operator):
    * (operator):
        1 (literal).
        2 (literal).
    - (operator):
        3 (literal).

mlr put -v $x = ~1 |  2 &  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        ~ (operator):
            1 (literal).
        & (operator):
            2 (literal).
            3 (literal).

mlr filter -v      ~1 |  2 &  3 /dev/null
| (operator):
    ~ (operator):
        1 (literal).
    & (operator):
        2 (literal).
        3 (literal).

mlr put -v $x = ~1 &  2 |  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        & (operator):
            ~ (operator):
                1 (literal).
            2 (literal).
        3 (literal).

mlr filter -v      ~1 &  2 |  3 /dev/null
| (operator):
    & (operator):
        ~ (operator):
            1 (literal).
        2 (literal).
    3 (literal).

mlr put -v $x =  1 | ~2 &  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        1 (literal).
        & (operator):
            ~ (operator):
                2 (literal).
            3 (literal).

mlr filter -v       1 | ~2 &  3 /dev/null
| (operator):
    1 (literal).
    & (operator):
        ~ (operator):
            2 (literal).
        3 (literal).

mlr put -v $x =  1 & ~2 |  3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        & (operator):
            1 (literal).
            ~ (operator):
                2 (literal).
        3 (literal).

mlr filter -v       1 & ~2 |  3 /dev/null
| (operator):
    & (operator):
        1 (literal).
        ~ (operator):
            2 (literal).
    3 (literal).

mlr put -v $x =  1 |  2 & ~3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        1 (literal).
        & (operator):
            2 (literal).
            ~ (operator):
                3 (literal).

mlr filter -v       1 |  2 & ~3 /dev/null
| (operator):
    1 (literal).
    & (operator):
        2 (literal).
        ~ (operator):
            3 (literal).

mlr put -v $x =  1 &  2 | ~3 /dev/null
= (operator):
    x (field_name).
    | (operator):
        & (operator):
            1 (literal).
            2 (literal).
        ~ (operator):
            3 (literal).

mlr filter -v       1 &  2 | ~3 /dev/null
| (operator):
    & (operator):
        1 (literal).
        2 (literal).
    ~ (operator):
        3 (literal).

mlr put -v $x = $a==1 && $b == 1 && $c == 1 /dev/null
= (operator):
    x (field_name).
    && (operator):
        && (operator):
            == (operator):
                a (field_name).
                1 (literal).
            == (operator):
                b (field_name).
                1 (literal).
        == (operator):
            c (field_name).
            1 (literal).

mlr filter -v      $a==1 && $b == 1 && $c == 1 /dev/null
&& (operator):
    && (operator):
        == (operator):
            a (field_name).
            1 (literal).
        == (operator):
            b (field_name).
            1 (literal).
    == (operator):
        c (field_name).
        1 (literal).

mlr put -v $x = $a==1 || $b == 1 && $c == 1 /dev/null
= (operator):
    x (field_name).
    || (operator):
        == (operator):
            a (field_name).
            1 (literal).
        && (operator):
            == (operator):
                b (field_name).
                1 (literal).
            == (operator):
                c (field_name).
                1 (literal).

mlr filter -v      $a==1 || $b == 1 && $c == 1 /dev/null
|| (operator):
    == (operator):
        a (field_name).
        1 (literal).
    && (operator):
        == (operator):
            b (field_name).
            1 (literal).
        == (operator):
            c (field_name).
            1 (literal).

mlr put -v $x = $a==1 || $b == 1 || $c == 1 /dev/null
= (operator):
    x (field_name).
    || (operator):
        || (operator):
            == (operator):
                a (field_name).
                1 (literal).
            == (operator):
                b (field_name).
                1 (literal).
        == (operator):
            c (field_name).
            1 (literal).

mlr filter -v      $a==1 || $b == 1 || $c == 1 /dev/null
|| (operator):
    || (operator):
        == (operator):
            a (field_name).
            1 (literal).
        == (operator):
            b (field_name).
            1 (literal).
    == (operator):
        c (field_name).
        1 (literal).

mlr put -v $x = $a==1 && $b == 1 || $c == 1 /dev/null
= (operator):
    x (field_name).
    || (operator):
        && (operator):
            == (operator):
                a (field_name).
                1 (literal).
            == (operator):
                b (field_name).
                1 (literal).
        == (operator):
            c (field_name).
            1 (literal).

mlr filter -v      $a==1 && $b == 1 || $c == 1 /dev/null
|| (operator):
    && (operator):
        == (operator):
            a (field_name).
            1 (literal).
        == (operator):
            b (field_name).
            1 (literal).
    == (operator):
        c (field_name).
        1 (literal).


================================================================
DSL FUNCTIONAL TESTS

mlr filter $x>.3 ./reg_test/input/abixy
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=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=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr filter $x>0.3 ./reg_test/input/abixy
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=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=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr filter $x>0.3 && $y>0.3 ./reg_test/input/abixy
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=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

mlr filter $x>0.3 || $y>0.3 ./reg_test/input/abixy
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

mlr filter NR>=4 && NR <= 7 ./reg_test/input/abixy
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

mlr filter -x $x>.3 ./reg_test/input/abixy
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr filter -x $x>0.3 ./reg_test/input/abixy
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr filter -x $x>0.3 && $y>0.3 ./reg_test/input/abixy
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=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059

mlr filter -x $x>0.3 || $y>0.3 ./reg_test/input/abixy

mlr filter -x NR>=4 && NR <= 7 ./reg_test/input/abixy
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=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

mlr filter $nosuchfield>.3 ./reg_test/input/abixy

mlr put $x2 = $x**2 ./reg_test/input/abixy
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,x2=0.120263
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,x2=0.575595
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,x2=0.041863
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,x2=0.145465
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,x2=0.328660
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,x2=0.277862
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,x2=0.374280
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,x2=0.358267
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,x2=0.000989
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,x2=0.252633

mlr put $z = -0.024*$x+0.13 ./reg_test/input/abixy
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,z=0.121677
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,z=0.111792
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,z=0.125090
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,z=0.120846
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,z=0.116241
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,z=0.117349
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,z=0.115317
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,z=0.115635
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,z=0.129245
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,z=0.117937

mlr put $c = $a . $b ./reg_test/input/abixy
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,c=panpan
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,c=ekspan
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,c=wyewye
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,c=ekswye
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,c=wyepan
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,c=zeepan
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,c=ekszee
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,c=zeewye
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,c=hatwye
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,c=panwye

mlr put $ii = $i + $i ./reg_test/input/abixy
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,ii=2
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,ii=4
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,ii=6
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,ii=8
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,ii=10
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,ii=12
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,ii=14
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,ii=16
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,ii=18
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,ii=20

mlr put $emptytest = $i + $nosuch ./reg_test/input/abixy
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,emptytest=
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,emptytest=
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,emptytest=
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,emptytest=
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,emptytest=
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,emptytest=
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,emptytest=
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,emptytest=
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,emptytest=
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,emptytest=

mlr --opprint put $nr=NR;$fnr=FNR;$nf=NF;$filenum=FILENUM ./reg_test/input/abixy ./reg_test/input/abixy
a   b   i  x                   y                   nr fnr nf filenum
pan pan 1  0.3467901443380824  0.7268028627434533  1  1   7  1
eks pan 2  0.7586799647899636  0.5221511083334797  2  2   7  1
wye wye 3  0.20460330576630303 0.33831852551664776 3  3   7  1
eks wye 4  0.38139939387114097 0.13418874328430463 4  4   7  1
wye pan 5  0.5732889198020006  0.8636244699032729  5  5   7  1
zee pan 6  0.5271261600918548  0.49322128674835697 6  6   7  1
eks zee 7  0.6117840605678454  0.1878849191181694  7  7   7  1
zee wye 8  0.5985540091064224  0.976181385699006   8  8   7  1
hat wye 9  0.03144187646093577 0.7495507603507059  9  9   7  1
pan wye 10 0.5026260055412137  0.9526183602969864  10 10  7  1
pan pan 1  0.3467901443380824  0.7268028627434533  11 1   7  2
eks pan 2  0.7586799647899636  0.5221511083334797  12 2   7  2
wye wye 3  0.20460330576630303 0.33831852551664776 13 3   7  2
eks wye 4  0.38139939387114097 0.13418874328430463 14 4   7  2
wye pan 5  0.5732889198020006  0.8636244699032729  15 5   7  2
zee pan 6  0.5271261600918548  0.49322128674835697 16 6   7  2
eks zee 7  0.6117840605678454  0.1878849191181694  17 7   7  2
zee wye 8  0.5985540091064224  0.976181385699006   18 8   7  2
hat wye 9  0.03144187646093577 0.7495507603507059  19 9   7  2
pan wye 10 0.5026260055412137  0.9526183602969864  20 10  7  2

mlr --opprint put $y=madd($x,10,37) then put $z=msub($x,10,37) ./reg_test/input/modarith.dat
x   y  z
-37 10 27
-36 11 28
-35 12 29
-34 13 30
-33 14 31
-32 15 32
-31 16 33
-30 17 34
-29 18 35
-28 19 36
-27 20 0
-26 21 1
-25 22 2
-24 23 3
-23 24 4
-22 25 5
-21 26 6
-20 27 7
-19 28 8
-18 29 9
-17 30 10
-16 31 11
-15 32 12
-14 33 13
-13 34 14
-12 35 15
-11 36 16
-10 0  17
-9  1  18
-8  2  19
-7  3  20
-6  4  21
-5  5  22
-4  6  23
-3  7  24
-2  8  25
-1  9  26
0   10 27
1   11 28
2   12 29
3   13 30
4   14 31
5   15 32
6   16 33
7   17 34
8   18 35
9   19 36
10  20 0
11  21 1
12  22 2
13  23 3
14  24 4
15  25 5
16  26 6
17  27 7
18  28 8
19  29 9
20  30 10
21  31 11
22  32 12
23  33 13
24  34 14
25  35 15
26  36 16
27  0  17
28  1  18
29  2  19
30  3  20
31  4  21
32  5  22
33  6  23
34  7  24
35  8  25
36  9  26
37  10 27
38  11 28
39  12 29
40  13 30
41  14 31
42  15 32
43  16 33
44  17 34
45  18 35
46  19 36
47  20 0
48  21 1
49  22 2
50  23 3
51  24 4
52  25 5
53  26 6
54  27 7
55  28 8
56  29 9
57  30 10
58  31 11
59  32 12
60  33 13
61  34 14
62  35 15
63  36 16
64  0  17
65  1  18
66  2  19
67  3  20
68  4  21
69  5  22
70  6  23
71  7  24
72  8  25
73  9  26

mlr --opprint put $y=mexp($x,35,37) then put $z=mmul($x,$y,37) ./reg_test/input/modarith.dat
x   y  z
-37 0  0
-36 1  1
-35 19 1
-34 25 1
-33 28 1
-32 15 1
-31 31 1
-30 16 1
-29 14 1
-28 33 1
-27 26 1
-26 27 1
-25 34 1
-24 20 1
-23 8  1
-22 5  1
-21 7  1
-20 24 1
-19 35 1
-18 2  1
-17 13 1
-16 30 1
-15 32 1
-14 29 1
-13 17 1
-12 3  1
-11 10 1
-10 11 1
-9  4  1
-8  23 1
-7  21 1
-6  6  1
-5  22 1
-4  9  1
-3  12 1
-2  18 1
-1  36 1
0   0  0
1   1  1
2   19 1
3   25 1
4   28 1
5   15 1
6   31 1
7   16 1
8   14 1
9   33 1
10  26 1
11  27 1
12  34 1
13  20 1
14  8  1
15  5  1
16  7  1
17  24 1
18  35 1
19  2  1
20  13 1
21  30 1
22  32 1
23  29 1
24  17 1
25  3  1
26  10 1
27  11 1
28  4  1
29  23 1
30  21 1
31  6  1
32  22 1
33  9  1
34  12 1
35  18 1
36  36 1
37  0  0
38  1  1
39  19 1
40  25 1
41  28 1
42  15 1
43  31 1
44  16 1
45  14 1
46  33 1
47  26 1
48  27 1
49  34 1
50  20 1
51  8  1
52  5  1
53  7  1
54  24 1
55  35 1
56  2  1
57  13 1
58  30 1
59  32 1
60  29 1
61  17 1
62  3  1
63  10 1
64  11 1
65  4  1
66  23 1
67  21 1
68  6  1
69  22 1
70  9  1
71  12 1
72  18 1
73  36 1

mlr put $z=min($x, $y) ./reg_test/input/minmax.dkvp
x=1,y=2,z=1
x=1,y=,z=1
x=,y=,z=
x=,y=2,z=2
x=3,y=2,z=2
x=3,y=,z=3
x=,y=,z=
x=,y=2,z=2

mlr put $z=max($x, $y) ./reg_test/input/minmax.dkvp
x=1,y=2,z=2
x=1,y=,z=1
x=,y=,z=
x=,y=2,z=2
x=3,y=2,z=3
x=3,y=,z=3
x=,y=,z=
x=,y=2,z=2


================================================================
DSL NULL/EMPTY HANDLING

mlr put $z = $x + $y ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,z=3
x=1,y=,s=,z=
x=,y=,s=hurrah,z=

mlr put $z = $y + $y ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,z=4
x=1,y=,s=,z=
x=,y=,s=hurrah,z=

mlr put $z = $x + $nosuch ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,z=
x=1,y=,s=,z=
x=,y=,s=hurrah,z=

mlr put $t = sub($s,       "ell", "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=hXo
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah

mlr put $t = sub($s,       "ell", "") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=ho
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah

mlr put $t = sub($nosuch,  "ell", "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=
x=1,y=,s=,t=
x=,y=,s=hurrah,t=

mlr put $t = gsub($s,      "l",   "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=heXXo
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah

mlr put $t = gsub($s,      "l",   "") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=heo
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah

mlr put $t = gsub($nosuch, "l",   "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=
x=1,y=,s=,t=
x=,y=,s=hurrah,t=


================================================================
DSL TYPE-INFERENCE

mlr --xtab put $y     = $pi1 + $pi2 ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   151

mlr --xtab put -F $y     = $pi1 + $pi2 ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   151.000000

mlr --xtab put -S $y     = $pi1 . $pi2 ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   7576

mlr --xtab filter 999   != $pi1 + $pi2 ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76

mlr --xtab filter -F 999   != $pi1 + $pi2 ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76

mlr --xtab filter -S "999" != $pi1 . $pi2 ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76

mlr --xtab put $y=abs($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   71.200000

mlr --xtab put $y=abs($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   71.200000

mlr --xtab put $y=abs($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $y=abs($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75

mlr --xtab put $y=abs($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75

mlr --xtab put $y=abs($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0

mlr --xtab put -F $y=abs($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   71.200000

mlr --xtab put -F $y=abs($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   71.200000

mlr --xtab put -F $y=abs($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put -F $y=abs($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75.000000

mlr --xtab put -F $y=abs($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75.000000

mlr --xtab put -F $y=abs($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $y=ceil($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   72.000000

mlr --xtab put $y=ceil($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -71.000000

mlr --xtab put $y=ceil($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $y=ceil($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75

mlr --xtab put $y=ceil($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -75

mlr --xtab put $y=ceil($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0

mlr --xtab put -F $y=floor($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   71.000000

mlr --xtab put -F $y=floor($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -72.000000

mlr --xtab put -F $y=floor($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put -F $y=floor($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75.000000

mlr --xtab put -F $y=floor($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -75.000000

mlr --xtab put -F $y=floor($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $y=round($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   71.000000

mlr --xtab put $y=round($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -71.000000

mlr --xtab put $y=round($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $y=round($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75

mlr --xtab put $y=round($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -75

mlr --xtab put $y=round($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0

mlr --xtab put -F $y=round($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   71.000000

mlr --xtab put -F $y=round($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -71.000000

mlr --xtab put -F $y=round($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put -F $y=round($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   75.000000

mlr --xtab put -F $y=round($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -75.000000

mlr --xtab put -F $y=round($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $y=sgn($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   1.000000

mlr --xtab put $y=sgn($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -1.000000

mlr --xtab put $y=sgn($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $y=sgn($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   1

mlr --xtab put $y=sgn($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -1

mlr --xtab put $y=sgn($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0

mlr --xtab put -F $y=sgn($pf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   1.000000

mlr --xtab put -F $y=sgn($nf1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -1.000000

mlr --xtab put -F $y=sgn($zf) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put -F $y=sgn($pi1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   1.000000

mlr --xtab put -F $y=sgn($ni1) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   -1.000000

mlr --xtab put -F $y=sgn($zi) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
y   0.000000

mlr --xtab put $min=min($pf1,$pf2);$max=max($pf1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 73.400000

mlr --xtab put $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 76.000000

mlr --xtab put $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 73.400000
max 75.000000

mlr --xtab put $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 75
max 76

mlr --xtab put -F $min=min($pf1,$pf2);$max=max($pf1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 73.400000

mlr --xtab put -F $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 76.000000

mlr --xtab put -F $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 73.400000
max 75.000000

mlr --xtab put -F $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 75.000000
max 76.000000

mlr --xtab put $min=min($pf1,$pf2);$max=max($pf1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 73.400000

mlr --xtab put $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 76.000000

mlr --xtab put $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 73.400000
max 75.000000

mlr --xtab put $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 75
max 76

mlr --xtab put -F $min=min($pf1,$pf2);$max=max($pf1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 73.400000

mlr --xtab put -F $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 71.200000
max 76.000000

mlr --xtab put -F $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 73.400000
max 75.000000

mlr --xtab put -F $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
min 75.000000
max 76.000000

mlr --xtab put $sum=$pf1+$pf2;$diff=$pf1-$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  144.600000
diff -2.200000

mlr --xtab put $sum=$pf1+$pi2;$diff=$pf1-$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  147.200000
diff -4.800000

mlr --xtab put $sum=$pi1+$pf2;$diff=$pi1-$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  148.400000
diff 1.600000

mlr --xtab put $sum=$pi1+$pi2;$diff=$pi1-$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  151
diff -1

mlr --xtab put -F $sum=$pf1+$pf2;$diff=$pf1-$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  144.600000
diff -2.200000

mlr --xtab put -F $sum=$pf1+$pi2;$diff=$pf1-$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  147.200000
diff -4.800000

mlr --xtab put -F $sum=$pi1+$pf2;$diff=$pi1-$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  148.400000
diff 1.600000

mlr --xtab put -F $sum=$pi1+$pi2;$diff=$pi1-$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
sum  151.000000
diff -1.000000

mlr --xtab put $prod=$pf1*$pf2;$quot=$pf1/$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5226.080000
quot 0.970027

mlr --xtab put $prod=$pf1*$pi2;$quot=$pf1/$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5411.200000
quot 0.936842

mlr --xtab put $prod=$pi1*$pf2;$quot=$pi1/$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5505.000000
quot 1.021798

mlr --xtab put $prod=$pi1*$pi2;$quot=$pi1/$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5700
quot 0.986842

mlr --xtab put -F $prod=$pf1*$pf2;$quot=$pf1/$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5226.080000
quot 0.970027

mlr --xtab put -F $prod=$pf1*$pi2;$quot=$pf1/$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5411.200000
quot 0.936842

mlr --xtab put -F $prod=$pi1*$pf2;$quot=$pi1/$pf2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5505.000000
quot 1.021798

mlr --xtab put -F $prod=$pi1*$pi2;$quot=$pi1/$pi2 ./reg_test/input/mixed-types.xtab
pf1  71.2
nf1  -71.2
zf   0.0
pf2  73.4
nf2  -73.4
pi1  75
ni1  -75
zi   0
pi2  76
ni2  -76
prod 5700.000000
quot 0.986842

mlr --xtab put $iquot=$pf1//$pf2;$mod=$pf1%$pf2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 0.000000
mod   71.200000

mlr --xtab put $iquot=$pf1//$pi2;$mod=$pf1%$pi2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 0.000000
mod   71.200000

mlr --xtab put $iquot=$pi1//$pf2;$mod=$pi1%$pf2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 1.000000
mod   1.600000

mlr --xtab put $iquot=$pi1//$pi2;$mod=$pi1%$pi2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 0
mod   75

mlr --xtab put -F $iquot=$pf1//$pf2;$mod=$pf1%$pf2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 0.000000
mod   71.200000

mlr --xtab put -F $iquot=$pf1//$pi2;$mod=$pf1%$pi2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 0.000000
mod   71.200000

mlr --xtab put -F $iquot=$pi1//$pf2;$mod=$pi1%$pf2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 1.000000
mod   1.600000

mlr --xtab put -F $iquot=$pi1//$pi2;$mod=$pi1%$pi2 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
iquot 0.000000
mod   75.000000

mlr --xtab put $a=roundm($pf1,10.0);$b=roundm($pf1,-10.0) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
a   70.000000
b   70.000000

mlr --xtab put $a=roundm($pf1,10)  ;$b=roundm($pf1,-10)   ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
a   70.000000
b   70.000000

mlr --xtab put $a=roundm($pi1,10.0);$b=roundm($pi1,-10.0) ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
a   80.000000
b   80.000000

mlr --xtab put $a=roundm($pi1,10)  ;$b=roundm($pi1,-10)   ./reg_test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf  0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi  0
pi2 76
ni2 -76
a   70
b   70


================================================================
DSL SCIENTIFIC NOTATION IN FIELD VALUES

mlr --opprint put $y=$x+1 ./reg_test/input/scinot.dkvp
x       y
123     124
123.    124.000000
123.4   124.400000
.234    1.234000
1e2     101.000000
1e-2    1.010000
1.2e3   1201.000000
1.e3    1001.000000
1.2e-3  1.001200
1.e-3   1.001000
.2e3    201.000000
.2e-3   1.000200
1.e-3   1.001000
-123    -122
-123.   -122.000000
-123.4  -122.400000
-.234   0.766000
-1e2    -99.000000
-1e-2   0.990000
-1.2e3  -1199.000000
-1.e3   -999.000000
-1.2e-3 0.998800
-1.e-3  0.999000
-.2e3   -199.000000
-.2e-3  0.999800
-1.e-3  0.999000


================================================================
DSL SCIENTIFIC NOTATION IN EXPRESSION LITERALS

mlr --opprint put $y = 123     + $i ./reg_test/input/scinot1.dkvp
i y
1 124

mlr --opprint put $y = 123.    + $i ./reg_test/input/scinot1.dkvp
i y
1 124.000000

mlr --opprint put $y = 123.4   + $i ./reg_test/input/scinot1.dkvp
i y
1 124.400000

mlr --opprint put $y = .234    + $i ./reg_test/input/scinot1.dkvp
i y
1 1.234000

mlr --opprint put $y = 1e2     + $i ./reg_test/input/scinot1.dkvp
i y
1 101.000000

mlr --opprint put $y = 1e-2    + $i ./reg_test/input/scinot1.dkvp
i y
1 1.010000

mlr --opprint put $y = 1.2e3   + $i ./reg_test/input/scinot1.dkvp
i y
1 1201.000000

mlr --opprint put $y = 1.e3    + $i ./reg_test/input/scinot1.dkvp
i y
1 1001.000000

mlr --opprint put $y = 1.2e-3  + $i ./reg_test/input/scinot1.dkvp
i y
1 1.001200

mlr --opprint put $y = 1.e-3   + $i ./reg_test/input/scinot1.dkvp
i y
1 1.001000

mlr --opprint put $y = .2e3    + $i ./reg_test/input/scinot1.dkvp
i y
1 201.000000

mlr --opprint put $y = .2e-3   + $i ./reg_test/input/scinot1.dkvp
i y
1 1.000200

mlr --opprint put $y = 1.e-3   + $i ./reg_test/input/scinot1.dkvp
i y
1 1.001000

mlr --opprint put $y = -123    + $i ./reg_test/input/scinot1.dkvp
i y
1 -122

mlr --opprint put $y = -123.   + $i ./reg_test/input/scinot1.dkvp
i y
1 -122.000000

mlr --opprint put $y = -123.4  + $i ./reg_test/input/scinot1.dkvp
i y
1 -122.400000

mlr --opprint put $y = -.234   + $i ./reg_test/input/scinot1.dkvp
i y
1 0.766000

mlr --opprint put $y = -1e2    + $i ./reg_test/input/scinot1.dkvp
i y
1 -99.000000

mlr --opprint put $y = -1e-2   + $i ./reg_test/input/scinot1.dkvp
i y
1 0.990000

mlr --opprint put $y = -1.2e3  + $i ./reg_test/input/scinot1.dkvp
i y
1 -1199.000000

mlr --opprint put $y = -1.e3   + $i ./reg_test/input/scinot1.dkvp
i y
1 -999.000000

mlr --opprint put $y = -1.2e-3 + $i ./reg_test/input/scinot1.dkvp
i y
1 0.998800

mlr --opprint put $y = -1.e-3  + $i ./reg_test/input/scinot1.dkvp
i y
1 0.999000

mlr --opprint put $y = -.2e3   + $i ./reg_test/input/scinot1.dkvp
i y
1 -199.000000

mlr --opprint put $y = -.2e-3  + $i ./reg_test/input/scinot1.dkvp
i y
1 0.999800

mlr --opprint put $y = -1.e-3  + $i ./reg_test/input/scinot1.dkvp
i y
1 0.999000


================================================================
STATS1/STEP INT/FLOAT

mlr --opprint step -a rsum,delta,counter -f x,y,z ./reg_test/input/int-float.dkvp
x y    z    x_rsum x_delta x_counter y_rsum    y_delta  y_counter z_rsum    z_delta   z_counter
1 10.1 20   1      0       1         10.100000 0        1         20        0         1
2 10.2 30   3      1       2         20.300000 0.100000 2         50        10        2
3 10.3 40.8 6      1       3         30.600000 0.100000 3         90.800000 10.800000 3

mlr --opprint step -F -a rsum,delta,counter -f x,y,z ./reg_test/input/int-float.dkvp
x y    z    x_rsum   x_delta  x_counter y_rsum    y_delta  y_counter z_rsum    z_delta   z_counter
1 10.1 20   1.000000 0.000000 1.000000  10.100000 0.000000 1.000000  20.000000 0.000000  1.000000
2 10.2 30   3.000000 1.000000 2.000000  20.300000 0.100000 2.000000  50.000000 10.000000 2.000000
3 10.3 40.8 6.000000 1.000000 3.000000  30.600000 0.100000 3.000000  90.800000 10.800000 3.000000

mlr --oxtab stats1 -a min,max,sum,count -f x,y,z ./reg_test/input/int-float.dkvp
x_min   1
x_max   1
x_sum   6
x_count 3
y_min   10.100000
y_max   10.100000
y_sum   30.600000
y_count 3
z_min   20.000000
z_max   20.000000
z_sum   90.800000
z_count 3

mlr --oxtab stats1 -F -a min,max,sum,count -f x,y,z ./reg_test/input/int-float.dkvp
x_min   1.000000
x_max   1.000000
x_sum   6.000000
x_count 3.000000
y_min   10.100000
y_max   10.100000
y_sum   30.600000
y_count 3.000000
z_min   20.000000
z_max   20.000000
z_sum   90.800000
z_count 3.000000


================================================================
DSL PYTHONIC DIVISION

mlr --xtab put $quot=$pf1/10.0;$iquot=$pf1//10.0;$mod=$pf1%10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.120000
iquot 7.000000
mod   1.200000

mlr --xtab put $quot=$pi1/10  ;$iquot=$pi1//10  ;$mod=$pi1%10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.500000
iquot 7
mod   5

mlr --xtab put $quot=$nf1/10.0;$iquot=$nf1//10.0;$mod=$nf1%10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.120000
iquot -8.000000
mod   8.800000

mlr --xtab put $quot=$ni1/10  ;$iquot=$ni1//10  ;$mod=$ni1%10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.500000
iquot -8
mod   5

mlr --xtab put -F $quot=$pf1/10.0;$iquot=$pf1//10.0;$mod=$pf1%10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.120000
iquot 7.000000
mod   1.200000

mlr --xtab put -F $quot=$pi1/10  ;$iquot=$pi1//10  ;$mod=$pi1%10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.500000
iquot 7.000000
mod   5.000000

mlr --xtab put -F $quot=$nf1/10.0;$iquot=$nf1//10.0;$mod=$nf1%10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.120000
iquot -8.000000
mod   8.800000

mlr --xtab put -F $quot=$ni1/10  ;$iquot=$ni1//10  ;$mod=$ni1%10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.500000
iquot -8.000000
mod   5.000000

mlr --xtab put $quot=$pf1/-10.0;$iquot=$pf1//-10.0;$mod=$pf1%-10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.120000
iquot -8.000000
mod   -8.800000

mlr --xtab put $quot=$pi1/-10  ;$iquot=$pi1//-10  ;$mod=$pi1%-10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.500000
iquot -8
mod   -5

mlr --xtab put $quot=$nf1/-10.0;$iquot=$nf1//-10.0;$mod=$nf1%-10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.120000
iquot 7.000000
mod   -1.200000

mlr --xtab put $quot=$ni1/-10  ;$iquot=$ni1//-10  ;$mod=$ni1%-10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.500000
iquot 7
mod   -5

mlr --xtab put -F $quot=$pf1/-10.0;$iquot=$pf1//-10.0;$mod=$pf1%-10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.120000
iquot -8.000000
mod   -8.800000

mlr --xtab put -F $quot=$pi1/-10  ;$iquot=$pi1//-10  ;$mod=$pi1%-10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  -7.500000
iquot -8.000000
mod   -5.000000

mlr --xtab put -F $quot=$nf1/-10.0;$iquot=$nf1//-10.0;$mod=$nf1%-10.0 ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.120000
iquot 7.000000
mod   -1.200000

mlr --xtab put -F $quot=$ni1/-10  ;$iquot=$ni1//-10  ;$mod=$ni1%-10   ./reg_test/input/mixed-types.xtab
pf1   71.2
nf1   -71.2
zf    0.0
pf2   73.4
nf2   -73.4
pi1   75
ni1   -75
zi    0
pi2   76
ni2   -76
quot  7.500000
iquot 7.000000
mod   -5.000000


================================================================
DSL REGEX MATCHING

mlr filter -v $x =~ "bcd" ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    bcd (literal).
x=abcd,y=ghi
x=abcde,y=ghi

mlr filter -v $x =~ "^bcd" ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^bcd (literal).

mlr filter -v $x =~ "^abc" ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^abc (literal).
x=abc,y=def
x=abcd,y=ghi
x=abcde,y=ghi

mlr filter -v $x =~ "^abc$" ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^abc$ (literal).
x=abc,y=def

mlr filter -v $x =~ "^a.*d$" ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^a.*d$ (literal).
x=abcd,y=ghi

mlr filter -v $x =~ "^a.*"."d$" ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    . (operator):
        ^a.* (literal).
        d$ (literal).
x=abcd,y=ghi

mlr filter -v $y =~ "\".." ./reg_test/input/regex.dkvp
=~ (operator):
    y (field_name).
    \".. (literal).
x=ABCDE,y="GHI"

mlr filter -v $x =~ "bcd"i ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    bcd (regexi).
x=abcd,y=ghi
x=ABCD,y=GHI
x=abcde,y=ghi
x=ABCDE,y=GHI
x=ABCDE,y="GHI"

mlr filter -v $x =~ "^bcd"i ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^bcd (regexi).

mlr filter -v $x =~ "^abc"i ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^abc (regexi).
x=abc,y=def
x=ABC,y=DEF
x=abcd,y=ghi
x=ABCD,y=GHI
x=abcde,y=ghi
x=ABCDE,y=GHI
x=ABCDE,y="GHI"

mlr filter -v $x =~ "^abc$"i ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^abc$ (regexi).
x=abc,y=def
x=ABC,y=DEF

mlr filter -v $x =~ "^a.*d$"i ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    ^a.*d$ (regexi).
x=abcd,y=ghi
x=ABCD,y=GHI

mlr filter -v $x =~ "^a.*"."d$"i ./reg_test/input/regex.dkvp
=~ (operator):
    x (field_name).
    . (operator):
        ^a.* (literal).
        d$ (regexi).
x=abcd,y=ghi


================================================================
DSL DATETIME FUNCTIONS

mlr --csvlite put $gmt = sec2gmt($sec) ./reg_test/input/sec2gmt
sec,gmt
0,1970-01-01T00:00:00Z
1,1970-01-01T00:00:01Z
10,1970-01-01T00:00:10Z
100,1970-01-01T00:01:40Z
1000,1970-01-01T00:16:40Z
10000,1970-01-01T02:46:40Z
100000,1970-01-02T03:46:40Z
1000000,1970-01-12T13:46:40Z
10000000,1970-04-26T17:46:40Z
100000000,1973-03-03T09:46:40Z
1000000000,2001-09-09T01:46:40Z
1432036180,2015-05-19T11:49:40Z
1500000000,2017-07-14T02:40:00Z
2000000000,2033-05-18T03:33:20Z

mlr --csvlite put $sec = gmt2sec($gmt) ./reg_test/input/gmt2sec
gmt,sec
1970-01-01T00:00:00Z,0
1970-01-01T00:00:01Z,1
1970-01-01T00:00:10Z,10
1970-01-01T00:01:40Z,100
1970-01-01T00:16:40Z,1000
1970-01-01T02:46:40Z,10000
1970-01-02T03:46:40Z,100000
1970-01-12T13:46:40Z,1000000
1970-04-26T17:46:40Z,10000000
1973-03-03T09:46:40Z,100000000
2001-09-09T01:46:40Z,1000000000
2015-05-19T11:49:40Z,1432036180
2017-07-14T02:40:00Z,1500000000
2033-05-18T03:33:20Z,2000000000

mlr --csvlite put $gmt = strftime($sec, "%Y-%m-%dT%H:%M:%SZ") ./reg_test/input/sec2gmt
sec,gmt
0,1970-01-01T00:00:00Z
1,1970-01-01T00:00:01Z
10,1970-01-01T00:00:10Z
100,1970-01-01T00:01:40Z
1000,1970-01-01T00:16:40Z
10000,1970-01-01T02:46:40Z
100000,1970-01-02T03:46:40Z
1000000,1970-01-12T13:46:40Z
10000000,1970-04-26T17:46:40Z
100000000,1973-03-03T09:46:40Z
1000000000,2001-09-09T01:46:40Z
1432036180,2015-05-19T11:49:40Z
1500000000,2017-07-14T02:40:00Z
2000000000,2033-05-18T03:33:20Z

mlr --csvlite put $sec = strptime($gmt, "%Y-%m-%dT%H:%M:%SZ") ./reg_test/input/gmt2sec
gmt,sec
1970-01-01T00:00:00Z,0
1970-01-01T00:00:01Z,1
1970-01-01T00:00:10Z,10
1970-01-01T00:01:40Z,100
1970-01-01T00:16:40Z,1000
1970-01-01T02:46:40Z,10000
1970-01-02T03:46:40Z,100000
1970-01-12T13:46:40Z,1000000
1970-04-26T17:46:40Z,10000000
1973-03-03T09:46:40Z,100000000
2001-09-09T01:46:40Z,1000000000
2015-05-19T11:49:40Z,1432036180
2017-07-14T02:40:00Z,1500000000
2033-05-18T03:33:20Z,2000000000

mlr --csvlite sec2gmt sec ./reg_test/input/sec2gmt
sec
1970-01-01T00:00:00Z
1970-01-01T00:00:01Z
1970-01-01T00:00:10Z
1970-01-01T00:01:40Z
1970-01-01T00:16:40Z
1970-01-01T02:46:40Z
1970-01-02T03:46:40Z
1970-01-12T13:46:40Z
1970-04-26T17:46:40Z
1973-03-03T09:46:40Z
2001-09-09T01:46:40Z
2015-05-19T11:49:40Z
2017-07-14T02:40:00Z
2033-05-18T03:33:20Z

mlr --opprint put $hms=sec2hms($sec);   $resec=hms2sec($hms);   $diff=$resec-$sec ./reg_test/input/sec2xhms
sec     hms        resec   diff
0       00:00:00   0       0
1       00:00:01   1       0
59      00:00:59   59      0
60      00:01:00   60      0
61      00:01:01   61      0
3599    00:59:59   3599    0
3600    01:00:00   3600    0
3601    01:00:01   3601    0
86399   23:59:59   86399   0
86400   24:00:00   86400   0
86401   24:00:01   86401   0
863999  239:59:59  863999  0
864000  240:00:00  864000  0
864001  240:00:01  864001  0
-1      -00:00:01  -1      0
-59     -00:00:59  -59     0
-60     -00:01:00  -60     0
-61     -00:01:01  -61     0
-3599   -00:59:59  -3599   0
-3600   -01:00:00  -3600   0
-3601   -01:00:01  -3601   0
-86399  -23:59:59  -86399  0
-86400  -24:00:00  -86400  0
-86401  -24:00:01  -86401  0
-863999 -239:59:59 -863999 0
-864000 -240:00:00 -864000 0
-864001 -240:00:01 -864001 0

mlr --opprint put $hms=fsec2hms($sec);  $resec=hms2fsec($hms);  $diff=$resec-$sec ./reg_test/input/fsec2xhms
sec        hms               resec          diff
0.25       0:00:00.250000    0.250000       0.000000
1.25       0:00:01.250000    1.250000       0.000000
59.25      0:00:59.250000    59.250000      0.000000
60.25      0:01:00.250000    60.250000      0.000000
61.25      0:01:01.250000    61.250000      0.000000
3599.25    0:59:59.250000    3599.250000    0.000000
3600.25    1:00:00.250000    3600.250000    0.000000
3601.25    1:00:01.250000    3601.250000    0.000000
86399.25   23:59:59.250000   86399.250000   0.000000
86400.25   24:00:00.250000   86400.250000   0.000000
86401.25   24:00:01.250000   86401.250000   0.000000
863999.25  239:59:59.250000  863999.250000  0.000000
864000.25  240:00:00.250000  864000.250000  0.000000
864001.25  240:00:01.250000  864001.250000  0.000000
-0.25      -00:00:00.250000  -0.250000      0.000000
-1.25      -00:00:01.250000  -1.250000      0.000000
-59.25     -00:00:59.250000  -59.250000     0.000000
-60.25     -00:01:00.250000  -60.250000     0.000000
-61.25     -00:01:01.250000  -61.250000     0.000000
-3599.25   -00:59:59.250000  -3599.250000   0.000000
-3600.25   -01:00:00.250000  -3600.250000   0.000000
-3601.25   -01:00:01.250000  -3601.250000   0.000000
-86399.25  -23:59:59.250000  -86399.250000  0.000000
-86400.25  -24:00:00.250000  -86400.250000  0.000000
-86401.25  -24:00:01.250000  -86401.250000  0.000000
-863999.25 -239:59:59.250000 -863999.250000 0.000000
-864000.25 -240:00:00.250000 -864000.250000 0.000000
-864001.25 -240:00:01.250000 -864001.250000 0.000000

mlr --opprint put $hms=sec2dhms($sec);  $resec=dhms2sec($hms);  $diff=$resec-$sec ./reg_test/input/sec2xhms
sec     hms           resec   diff
0       0s            0       0
1       1s            1       0
59      59s           59      0
60      1m00s         60      0
61      1m01s         61      0
3599    59m59s        3599    0
3600    1h00m00s      3600    0
3601    1h00m01s      3601    0
86399   23h59m59s     86399   0
86400   1d00h00m00s   86400   0
86401   1d00h00m01s   86401   0
863999  9d23h59m59s   863999  0
864000  10d00h00m00s  864000  0
864001  10d00h00m01s  864001  0
-1      -1s           -1      0
-59     -59s          -59     0
-60     -1m00s        -60     0
-61     -1m01s        -61     0
-3599   -59m59s       -3599   0
-3600   -1h00m00s     -3600   0
-3601   -1h00m01s     -3601   0
-86399  -23h59m59s    -86399  0
-86400  -1d00h00m00s  -86400  0
-86401  -1d00h00m01s  -86401  0
-863999 -9d23h59m59s  -863999 0
-864000 -10d00h00m00s -864000 0
-864001 -10d00h00m01s -864001 0

mlr --opprint put $hms=fsec2dhms($sec); $resec=dhms2fsec($hms); $diff=$resec-$sec ./reg_test/input/fsec2xhms
sec        hms                  resec          diff
0.25       0.250000s            0.250000       0.000000
1.25       1.250000s            1.250000       0.000000
59.25      59.250000s           59.250000      0.000000
60.25      1m00.250000s         60.250000      0.000000
61.25      1m01.250000s         61.250000      0.000000
3599.25    59m59.250000s        3599.250000    0.000000
3600.25    1h00m00.250000s      3600.250000    0.000000
3601.25    1h00m01.250000s      3601.250000    0.000000
86399.25   23h59m59.250000s     86399.250000   0.000000
86400.25   1d00h00m00.250000s   86400.250000   0.000000
86401.25   1d00h00m01.250000s   86401.250000   0.000000
863999.25  9d23h59m59.250000s   863999.250000  0.000000
864000.25  10d00h00m00.250000s  864000.250000  0.000000
864001.25  10d00h00m01.250000s  864001.250000  0.000000
-0.25      -0.250000s           -0.250000      0.000000
-1.25      -1.250000s           -1.250000      0.000000
-59.25     -59.250000s          -59.250000     0.000000
-60.25     -1m00.250000s        -60.250000     0.000000
-61.25     -1m01.250000s        -61.250000     0.000000
-3599.25   -59m59.250000s       -3599.250000   0.000000
-3600.25   -1h00m00.250000s     -3600.250000   0.000000
-3601.25   -1h00m01.250000s     -3601.250000   0.000000
-86399.25  -23h59m59.250000s    -86399.250000  0.000000
-86400.25  -1d00h00m00.250000s  -86400.250000  0.000000
-86401.25  -1d00h00m01.250000s  -86401.250000  0.000000
-863999.25 -9d23h59m59.250000s  -863999.250000 0.000000
-864000.25 -10d00h00m00.250000s -864000.250000 0.000000
-864001.25 -10d00h00m01.250000s -864001.250000 0.000000


================================================================
DSL SUB/GSUB

mlr --opprint put $y = sub($x, "e.*l",        "") ./reg_test/input/sub.dat
x     y
hello ho
HELLO HELLO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "e.*l"i,       "") ./reg_test/input/sub.dat
x     y
hello ho
HELLO HO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "e.*"."l",     "") ./reg_test/input/sub.dat
x     y
hello ho
HELLO HELLO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "e.*l",        "y123y") ./reg_test/input/sub.dat
x     y
hello hy123yo
HELLO HELLO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "e.*l"i,       "y123y") ./reg_test/input/sub.dat
x     y
hello hy123yo
HELLO Hy123yO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "e.*"."l",     "y123y") ./reg_test/input/sub.dat
x     y
hello hy123yo
HELLO HELLO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "([hg])e.*l(.)", "y\1y123\2y") ./reg_test/input/sub.dat
x     y
hello yhy123oy
HELLO HELLO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "([hg])e.*l.",   "y\1y123\2y") ./reg_test/input/sub.dat
x     y
hello yhy123\2y
HELLO HELLO
world world
WORLD WORLD

mlr --opprint put $y = sub($x, "([hg])e.*l(.)", "y\1y123.y") ./reg_test/input/sub.dat
x     y
hello yhy123.y
HELLO HELLO
world world
WORLD WORLD

mlr --opprint put $y = sub($x,  "a",    "aa") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    aabcdefg
ababbabbba aababbabbba
LMNOP      LMNOP
ABCDEFG    ABCDEFG
ABABBABBBA ABABBABBBA

mlr --opprint put $y = gsub($x, "a",    "aa") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    aabcdefg
ababbabbba aabaabbaabbbaa
LMNOP      LMNOP
ABCDEFG    ABCDEFG
ABABBABBBA ABABBABBBA

mlr --opprint put $y = gsub($x, "A",    "Aa") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    abcdefg
ababbabbba ababbabbba
LMNOP      LMNOP
ABCDEFG    AaBCDEFG
ABABBABBBA AaBAaBBAaBBBAa

mlr --opprint put $y = gsub($x, "a"i,   "Aa") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    Aabcdefg
ababbabbba AabAabbAabbbAa
LMNOP      LMNOP
ABCDEFG    AaBCDEFG
ABABBABBBA AaBAaBBAaBBBAa

mlr --opprint put $y = gsub($x, "A"i,   "Aa") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    Aabcdefg
ababbabbba AabAabbAabbbAa
LMNOP      LMNOP
ABCDEFG    AaBCDEFG
ABABBABBBA AaBAaBBAaBBBAa

mlr --opprint put $y = gsub($x, "a(.)", "aa\1\1\1") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    aabbbcdefg
ababbabbba aabbbaabbbbaabbbbba
LMNOP      LMNOP
ABCDEFG    ABCDEFG
ABABBABBBA ABABBABBBA

mlr --opprint put $y = sub($x,  "a",    "") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    bcdefg
ababbabbba babbabbba
LMNOP      LMNOP
ABCDEFG    ABCDEFG
ABABBABBBA ABABBABBBA

mlr --opprint put $y = gsub($x, "a",    "") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    bcdefg
ababbabbba bbbbbb
LMNOP      LMNOP
ABCDEFG    ABCDEFG
ABABBABBBA ABABBABBBA

mlr --opprint put $y = gsub($x, "A",    "") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    abcdefg
ababbabbba ababbabbba
LMNOP      LMNOP
ABCDEFG    BCDEFG
ABABBABBBA BBBBBB

mlr --opprint put $y = gsub($x, "a"i,   "") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    bcdefg
ababbabbba bbbbbb
LMNOP      LMNOP
ABCDEFG    BCDEFG
ABABBABBBA BBBBBB

mlr --opprint put $y = gsub($x, "A"i,   "") ./reg_test/input/gsub.dat
x          y
lmnop      lmnop
abcdefg    bcdefg
ababbabbba bbbbbb
LMNOP      LMNOP
ABCDEFG    BCDEFG
ABABBABBBA BBBBBB


================================================================
CHAINING

mlr cat then cat ./reg_test/input/short
a=1
b=2
c=3

mlr cat then tac ./reg_test/input/short
c=3
b=2
a=1

mlr tac then cat ./reg_test/input/short
c=3
b=2
a=1

mlr tac then tac ./reg_test/input/short
a=1
b=2
c=3

mlr cat then cat then cat ./reg_test/input/short
a=1
b=2
c=3

mlr cat then cat then tac ./reg_test/input/short
c=3
b=2
a=1

mlr cat then tac then cat ./reg_test/input/short
c=3
b=2
a=1

mlr cat then tac then tac ./reg_test/input/short
a=1
b=2
c=3

mlr tac then cat then cat ./reg_test/input/short
c=3
b=2
a=1

mlr tac then cat then tac ./reg_test/input/short
a=1
b=2
c=3

mlr tac then tac then cat ./reg_test/input/short
a=1
b=2
c=3

mlr tac then tac then tac ./reg_test/input/short
c=3
b=2
a=1


================================================================
NUMBER FORMATTING

mlr --opprint stats1 -a sum -f x ./reg_test/input/ofmt.dat
x_sum
6

mlr --ofmt %.3lf --opprint stats1 -a sum -f x ./reg_test/input/ofmt.dat
x_sum
6

mlr --opprint --ofmt %.3lf stats1 -a sum -f x ./reg_test/input/ofmt.dat
x_sum
6


================================================================
IMPLICIT-HEADER-CSV INPUT

mlr --irs crlf --no-mmap --icsvlite --ifs , --opprint cut -x -f b/ ./reg_test/input/multi-sep.csv
a/   i/ x/                    y/
wye/ 0/ 0.641593543645736508/ 0.262688053894177098
eks/ 1/ 0.827614412562742041/ 0.715431942006308552
zee/ 2/ 0.923068348748175560/ 0.009737410587136359
zee/ 3/ 0.000047786161325772/ 0.803142013402256216
zee/ 4/ 0.676537984365847889/ 0.573903236805416328

mlr --irs crlf --implicit-csv-header --no-mmap --icsvlite --ifs , --opprint cut -x -f 2 ./reg_test/input/multi-sep.csv
1    3  4                     5
a/   i/ x/                    y/
wye/ 0/ 0.641593543645736508/ 0.262688053894177098
eks/ 1/ 0.827614412562742041/ 0.715431942006308552
zee/ 2/ 0.923068348748175560/ 0.009737410587136359
zee/ 3/ 0.000047786161325772/ 0.803142013402256216
zee/ 4/ 0.676537984365847889/ 0.573903236805416328

mlr --irs crlf --no-mmap --icsvlite --ifs /, --opprint cut -x -f b ./reg_test/input/multi-sep.csv
a   i x                    y/
wye 0 0.641593543645736508 0.262688053894177098
eks 1 0.827614412562742041 0.715431942006308552
zee 2 0.923068348748175560 0.009737410587136359
zee 3 0.000047786161325772 0.803142013402256216
zee 4 0.676537984365847889 0.573903236805416328

mlr --irs crlf --implicit-csv-header --no-mmap --icsvlite --ifs /, --opprint cut -x -f 2 ./reg_test/input/multi-sep.csv
1   3 4                    5
a   i x                    y/
wye 0 0.641593543645736508 0.262688053894177098
eks 1 0.827614412562742041 0.715431942006308552
zee 2 0.923068348748175560 0.009737410587136359
zee 3 0.000047786161325772 0.803142013402256216
zee 4 0.676537984365847889 0.573903236805416328

mlr --irs crlf --mmap --icsvlite --ifs , --opprint cut -x -f b/ ./reg_test/input/multi-sep.csv
a/   i/ x/                    y/
wye/ 0/ 0.641593543645736508/ 0.262688053894177098
eks/ 1/ 0.827614412562742041/ 0.715431942006308552
zee/ 2/ 0.923068348748175560/ 0.009737410587136359
zee/ 3/ 0.000047786161325772/ 0.803142013402256216
zee/ 4/ 0.676537984365847889/ 0.573903236805416328

mlr --irs crlf --implicit-csv-header --mmap --icsvlite --ifs , --opprint cut -x -f 2 ./reg_test/input/multi-sep.csv
1    3  4                     5
a/   i/ x/                    y/
wye/ 0/ 0.641593543645736508/ 0.262688053894177098
eks/ 1/ 0.827614412562742041/ 0.715431942006308552
zee/ 2/ 0.923068348748175560/ 0.009737410587136359
zee/ 3/ 0.000047786161325772/ 0.803142013402256216
zee/ 4/ 0.676537984365847889/ 0.573903236805416328

mlr --irs crlf --mmap --icsvlite --ifs /, --opprint cut -x -f b ./reg_test/input/multi-sep.csv
a   i x                    y/
wye 0 0.641593543645736508 0.262688053894177098
eks 1 0.827614412562742041 0.715431942006308552
zee 2 0.923068348748175560 0.009737410587136359
zee 3 0.000047786161325772 0.803142013402256216
zee 4 0.676537984365847889 0.573903236805416328

mlr --irs crlf --implicit-csv-header --mmap --icsvlite --ifs /, --opprint cut -x -f 2 ./reg_test/input/multi-sep.csv
1   3 4                    5
a   i x                    y/
wye 0 0.641593543645736508 0.262688053894177098
eks 1 0.827614412562742041 0.715431942006308552
zee 2 0.923068348748175560 0.009737410587136359
zee 3 0.000047786161325772 0.803142013402256216
zee 4 0.676537984365847889 0.573903236805416328

mlr --icsv --ifs , --opprint cut -x -f b/ ./reg_test/input/multi-sep.csv
a/   i/ x/                    y/
wye/ 0/ 0.641593543645736508/ 0.262688053894177098
eks/ 1/ 0.827614412562742041/ 0.715431942006308552
zee/ 2/ 0.923068348748175560/ 0.009737410587136359
zee/ 3/ 0.000047786161325772/ 0.803142013402256216
zee/ 4/ 0.676537984365847889/ 0.573903236805416328

mlr --implicit-csv-header --icsv --ifs , --opprint cut -x -f 2 ./reg_test/input/multi-sep.csv
1    3  4                     5
a/   i/ x/                    y/
wye/ 0/ 0.641593543645736508/ 0.262688053894177098
eks/ 1/ 0.827614412562742041/ 0.715431942006308552
zee/ 2/ 0.923068348748175560/ 0.009737410587136359
zee/ 3/ 0.000047786161325772/ 0.803142013402256216
zee/ 4/ 0.676537984365847889/ 0.573903236805416328

mlr --icsv --ifs /, --opprint cut -x -f b ./reg_test/input/multi-sep.csv
a   i x                    y/
wye 0 0.641593543645736508 0.262688053894177098
eks 1 0.827614412562742041 0.715431942006308552
zee 2 0.923068348748175560 0.009737410587136359
zee 3 0.000047786161325772 0.803142013402256216
zee 4 0.676537984365847889 0.573903236805416328

mlr --implicit-csv-header --icsv --ifs /, --opprint cut -x -f 2 ./reg_test/input/multi-sep.csv
1   3 4                    5
a   i x                    y/
wye 0 0.641593543645736508 0.262688053894177098
eks 1 0.827614412562742041 0.715431942006308552
zee 2 0.923068348748175560 0.009737410587136359
zee 3 0.000047786161325772 0.803142013402256216
zee 4 0.676537984365847889 0.573903236805416328


================================================================
HET-CSV INPUT

mlr --icsvlite --odkvp cat ./reg_test/input/a.csv
a=1,b=2,c=3
a=4,b=5,c=6

mlr --icsvlite --odkvp cat ./reg_test/input/b.csv
d=5,e=6,f=7

mlr --icsvlite --odkvp cat ./reg_test/input/c.csv
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9

mlr --icsvlite --odkvp cat ./reg_test/input/d.csv
h=3,i=4,j=5
m=8,n=9,o=10

mlr --icsvlite --odkvp cat ./reg_test/input/e.csv
a=1,b=2,c=3
a=4,b=5,c=6

mlr --icsvlite --odkvp cat ./reg_test/input/f.csv

mlr --icsvlite --odkvp cat ./reg_test/input/g.csv

mlr --icsvlite --odkvp cat ./reg_test/input/a.csv ./reg_test/input/a.csv
a=1,b=2,c=3
a=4,b=5,c=6
a=1,b=2,c=3
a=4,b=5,c=6

mlr --icsvlite --odkvp cat ./reg_test/input/b.csv ./reg_test/input/b.csv
d=5,e=6,f=7
d=5,e=6,f=7

mlr --icsvlite --odkvp cat ./reg_test/input/c.csv ./reg_test/input/c.csv
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9

mlr --icsvlite --odkvp cat ./reg_test/input/d.csv ./reg_test/input/d.csv
h=3,i=4,j=5
m=8,n=9,o=10
h=3,i=4,j=5
m=8,n=9,o=10

mlr --icsvlite --odkvp cat ./reg_test/input/e.csv ./reg_test/input/e.csv
a=1,b=2,c=3
a=4,b=5,c=6
a=1,b=2,c=3
a=4,b=5,c=6

mlr --icsvlite --odkvp cat ./reg_test/input/f.csv ./reg_test/input/f.csv

mlr --icsvlite --odkvp cat ./reg_test/input/g.csv ./reg_test/input/g.csv

mlr --icsvlite --odkvp cat ./reg_test/input/a.csv ./reg_test/input/b.csv
a=1,b=2,c=3
a=4,b=5,c=6
d=5,e=6,f=7

mlr --icsvlite --odkvp cat ./reg_test/input/b.csv ./reg_test/input/c.csv
d=5,e=6,f=7
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9

mlr --icsvlite --odkvp cat ./reg_test/input/c.csv ./reg_test/input/d.csv
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9
h=3,i=4,j=5
m=8,n=9,o=10

mlr --icsvlite --odkvp cat ./reg_test/input/d.csv ./reg_test/input/e.csv
h=3,i=4,j=5
m=8,n=9,o=10
a=1,b=2,c=3
a=4,b=5,c=6

mlr --icsvlite --odkvp cat ./reg_test/input/e.csv ./reg_test/input/f.csv
a=1,b=2,c=3
a=4,b=5,c=6

mlr --icsvlite --odkvp cat ./reg_test/input/f.csv ./reg_test/input/g.csv

mlr --icsvlite --odkvp cat ./reg_test/input/a.csv ./reg_test/input/b.csv ./reg_test/input/c.csv ./reg_test/input/d.csv ./reg_test/input/e.csv ./reg_test/input/f.csv ./reg_test/input/g.csv
a=1,b=2,c=3
a=4,b=5,c=6
d=5,e=6,f=7
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9
h=3,i=4,j=5
m=8,n=9,o=10
a=1,b=2,c=3
a=4,b=5,c=6

mlr --icsvlite --odkvp tac ./reg_test/input/het.csv
resource=/some/other/path,loadsec=0.97,ok=false
record_count=150,resource=/path/to/second/file
resource=/path/to/second/file,loadsec=0.32,ok=true
record_count=100,resource=/path/to/file
resource=/path/to/file,loadsec=0.45,ok=true

mlr --headerless-csv-output --csvlite tac ./reg_test/input/a.csv
4,5,6
1,2,3

mlr --headerless-csv-output --csvlite tac ./reg_test/input/c.csv
7,8,9
4,5,6
1,2,3

mlr --headerless-csv-output --csvlite tac ./reg_test/input/a.csv ./reg_test/input/c.csv
7,8,9
4,5,6
1,2,3
4,5,6
1,2,3

mlr --headerless-csv-output --csvlite tac ./reg_test/input/het.csv
/some/other/path,0.97,false

150,/path/to/second/file

/path/to/second/file,0.32,true

100,/path/to/file

/path/to/file,0.45,true

mlr --headerless-csv-output --csvlite group-like ./reg_test/input/het.csv
/path/to/file,0.45,true
/path/to/second/file,0.32,true
/some/other/path,0.97,false

100,/path/to/file
150,/path/to/second/file


================================================================
HET-PPRINT INPUT

mlr --ipprint --odkvp cat ./reg_test/input/a.pprint
a=1,b=2,c=3
a=4,b=5,c=6

mlr --ipprint --odkvp cat ./reg_test/input/b.pprint
d=5,e=6,f=7

mlr --ipprint --odkvp cat ./reg_test/input/c.pprint
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9

mlr --ipprint --odkvp cat ./reg_test/input/d.pprint
h=3,i=4,j=5
m=8,n=9,o=10

mlr --ipprint --odkvp cat ./reg_test/input/e.pprint
a=1,b=2,c=3
a=4,b=5,c=6

mlr --ipprint --odkvp cat ./reg_test/input/f.pprint

mlr --ipprint --odkvp cat ./reg_test/input/g.pprint

mlr --ipprint --odkvp cat ./reg_test/input/a.pprint ./reg_test/input/a.pprint
a=1,b=2,c=3
a=4,b=5,c=6
a=1,b=2,c=3
a=4,b=5,c=6

mlr --ipprint --odkvp cat ./reg_test/input/b.pprint ./reg_test/input/b.pprint
d=5,e=6,f=7
d=5,e=6,f=7

mlr --ipprint --odkvp cat ./reg_test/input/c.pprint ./reg_test/input/c.pprint
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9

mlr --ipprint --odkvp cat ./reg_test/input/d.pprint ./reg_test/input/d.pprint
h=3,i=4,j=5
m=8,n=9,o=10
h=3,i=4,j=5
m=8,n=9,o=10

mlr --ipprint --odkvp cat ./reg_test/input/e.pprint ./reg_test/input/e.pprint
a=1,b=2,c=3
a=4,b=5,c=6
a=1,b=2,c=3
a=4,b=5,c=6

mlr --ipprint --odkvp cat ./reg_test/input/f.pprint ./reg_test/input/f.pprint

mlr --ipprint --odkvp cat ./reg_test/input/g.pprint ./reg_test/input/g.pprint

mlr --ipprint --odkvp cat ./reg_test/input/a.pprint ./reg_test/input/b.pprint
a=1,b=2,c=3
a=4,b=5,c=6
d=5,e=6,f=7

mlr --ipprint --odkvp cat ./reg_test/input/b.pprint ./reg_test/input/c.pprint
d=5,e=6,f=7
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9

mlr --ipprint --odkvp cat ./reg_test/input/c.pprint ./reg_test/input/d.pprint
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9
h=3,i=4,j=5
m=8,n=9,o=10

mlr --ipprint --odkvp cat ./reg_test/input/d.pprint ./reg_test/input/e.pprint
h=3,i=4,j=5
m=8,n=9,o=10
a=1,b=2,c=3
a=4,b=5,c=6

mlr --ipprint --odkvp cat ./reg_test/input/e.pprint ./reg_test/input/f.pprint
a=1,b=2,c=3
a=4,b=5,c=6

mlr --ipprint --odkvp cat ./reg_test/input/f.pprint ./reg_test/input/g.pprint

mlr --ipprint --odkvp cat ./reg_test/input/a.pprint ./reg_test/input/b.pprint ./reg_test/input/c.pprint ./reg_test/input/d.pprint ./reg_test/input/e.pprint ./reg_test/input/f.pprint ./reg_test/input/g.pprint
a=1,b=2,c=3
a=4,b=5,c=6
d=5,e=6,f=7
a=1,b=2,c=3
a=4,b=5,c=6
a=7,b=8,c=9
h=3,i=4,j=5
m=8,n=9,o=10
a=1,b=2,c=3
a=4,b=5,c=6


================================================================
NULL-FIELD INPUT

mlr --icsvlite --odkvp cat ./reg_test/input/null-fields.csv
a=1,b=2,c=3,d=4,e=5
a=6,b=,c=,d=,e=10
a=,b=,c=,d=11,e=12
a=13,b=14,c=,d=,e=
a=,b=,c=,d=,e=

mlr --inidx --ifs comma --odkvp cat ./reg_test/input/null-fields.nidx
1=a,2=b,3=c,4=d,5=e
1=f,2=,3=,4=,5=g
1=,2=,3=,4=h,5=i
1=j,2=k,3=,4=,5=
1=,2=,3=,4=,5=

mlr --idkvp --oxtab cat ./reg_test/input/missings.dkvp
a 1
b 2
c 3
d 4
e 5
f 6

1 a
b 
x 4
c 3
5 d
6 e
7 f

1 a
b 
x 4
c 3
5 d
6 e
f 6


================================================================
SPACE-PADDING

mlr --mmap --idkvp --odkvp --ifs space --repifs cat ./reg_test/input/space-pad.dkvp
a=1,b=2
c=3

mlr --no-mmap --idkvp --odkvp --ifs space --repifs cat ./reg_test/input/space-pad.dkvp
a=1,b=2
c=3

mlr --mmap --inidx --odkvp --ifs space --repifs cat ./reg_test/input/space-pad.nidx
1=a,2=b,3=c
1=d,2=e,3=f

mlr --no-mmap --inidx --odkvp --ifs space --repifs cat ./reg_test/input/space-pad.nidx
1=a,2=b,3=c
1=d,2=e,3=f

mlr --mmap --icsvlite --odkvp --ifs space --repifs cat ./reg_test/input/space-pad.pprint
a=1,b=2,c=3

mlr --no-mmap --icsvlite --odkvp --ifs space --repifs cat ./reg_test/input/space-pad.pprint
a=1,b=2,c=3


================================================================
DOUBLE PS

mlr --no-mmap --opprint cat ./reg_test/input/double-ps.dkvp
a   b    c
pan wy.e 3
pan wy=e 3

mlr --mmap --opprint cat ./reg_test/input/double-ps.dkvp
a   b    c
pan wy.e 3
pan wy=e 3


================================================================
MISSING FINAL LF

mlr --no-mmap --csvlite cat ./reg_test/input/truncated.csv
a,b,c
1,2,3
4,5,6
7,8,9

mlr --csvlite cat ./reg_test/input/truncated.csv
a,b,c
1,2,3
4,5,6
7,8,9

mlr --no-mmap --dkvp cat ./reg_test/input/truncated.dkvp
a=1,b=2
c=3

mlr --dkvp cat ./reg_test/input/truncated.dkvp
a=1,b=2
c=3

mlr --no-mmap --nidx cat ./reg_test/input/truncated.nidx
1 2 3
4 5

mlr --nidx cat ./reg_test/input/truncated.nidx
1 2 3
4 5

mlr --no-mmap --pprint cat ./reg_test/input/truncated.pprint
a b c
1 2 3
4 5 6
7 8 9

mlr --pprint cat ./reg_test/input/truncated.pprint
a b c
1 2 3
4 5 6
7 8 9

mlr --no-mmap --xtab cat ./reg_test/input/truncated.xtab
a 1
b 2
c 3

d 4
e 5

mlr --xtab cat ./reg_test/input/truncated.xtab
a 1
b 2
c 3

d 4
e 5


================================================================
UTF-8 alignment

mlr --icsvlite --opprint cat ./reg_test/input/utf8-1.csv
langue   nom      jour
français françois vendredi

mlr --icsvlite --opprint cat ./reg_test/input/utf8-2.csv
français françois vendredi
langue   nom      jour

mlr --icsvlite --oxtab cat ./reg_test/input/utf8-1.csv
langue français
nom    françois
jour   vendredi

mlr --icsvlite --oxtab cat ./reg_test/input/utf8-2.csv
français langue
françois nom
vendredi jour

mlr --inidx --ifs space --opprint cat ./reg_test/input/utf8-align.nidx
1        2
191º     test
191      test2
francois français
françois francais

mlr --inidx --ifs space --opprint --right cat ./reg_test/input/utf8-align.nidx
       1        2
    191º     test
     191    test2
francois français
françois francais

mlr --oxtab cat ./reg_test/input/utf8-align.dkvp
191º test
1912 test2
cois çais
çois cais

191º test
1912 test2
ois  çais
çois cais

191º  test
1912  test2
coise çais
çois  cais

mlr --inidx --ifs space --oxtab --xvright cat ./reg_test/input/utf8-align.nidx
1 191º
2 test

1   191
2 test2

1 francois
2 français

1 françois
2 francais


================================================================
INT64 I/O

mlr --oxtab put $c=$a;$d=$b;$e=hexfmt($a);$f=hexfmt($b) ./reg_test/input/int64io.dkvp
a 0x1
b 1
c 1
d 1
e 0x1
f 0x1

a 0x7ffffffffffffffe
b 9223372036854775806
c 9223372036854775806
d 9223372036854775806
e 0x7ffffffffffffffe
f 0x7ffffffffffffffe

a 0x7fffffffffffffff
b 9223372036854775807
c 9223372036854775807
d 9223372036854775807
e 0x7fffffffffffffff
f 0x7fffffffffffffff

a 0x8000000000000000
b -9223372036854775808
c -9223372036854775808
d -9223372036854775808
e 0x8000000000000000
f 0x8000000000000000

a 0xffffffffffffffff
b -1
c -1
d -1
e 0xffffffffffffffff
f 0xffffffffffffffff

mlr --opprint put $p0=$p+0;$p1=$p+1;$p2=$p+2;$p3=$p+3 ./reg_test/input/int64arith.dkvp
p                  n                  p0                  p1                         p2                         p3
0x7ffffffffffff9ff 0x8000000000000000 9223372036854774271 9223372036854774272        9223372036854774273        9223372036854774274
0x7ffffffffffffa00 0x8000000000000001 9223372036854774272 9223372036854774273        9223372036854774274        9223372036854774275
0x7ffffffffffffbff 0x8000000000000200 9223372036854774783 9223372036854774784        9223372036854774785        9223372036854774786
0x7ffffffffffffc00 0x8000000000000201 9223372036854774784 9223372036854774785        9223372036854774786        9223372036854774787
0x7ffffffffffffdff 0x8000000000000400 9223372036854775295 9223372036854775296        9223372036854775297        9223372036854775298
0x7ffffffffffffe00 0x8000000000000401 9223372036854775296 9223372036854775297        9223372036854775298        9223372036854775299
0x7ffffffffffffffe 0x8000000000000600 9223372036854775806 9223372036854775807        9223372036854775808.000000 9223372036854775808.000000
0x7fffffffffffffff 0x8000000000000601 9223372036854775807 9223372036854775808.000000 9223372036854775808.000000 9223372036854775808.000000

mlr --opprint put $p0=$p-0;$p1=$p-1;$p2=$p-2;$p3=$p-3 ./reg_test/input/int64arith.dkvp
p                  n                  p0                  p1                  p2                  p3
0x7ffffffffffff9ff 0x8000000000000000 9223372036854774271 9223372036854774270 9223372036854774269 9223372036854774268
0x7ffffffffffffa00 0x8000000000000001 9223372036854774272 9223372036854774271 9223372036854774270 9223372036854774269
0x7ffffffffffffbff 0x8000000000000200 9223372036854774783 9223372036854774782 9223372036854774781 9223372036854774780
0x7ffffffffffffc00 0x8000000000000201 9223372036854774784 9223372036854774783 9223372036854774782 9223372036854774781
0x7ffffffffffffdff 0x8000000000000400 9223372036854775295 9223372036854775294 9223372036854775293 9223372036854775292
0x7ffffffffffffe00 0x8000000000000401 9223372036854775296 9223372036854775295 9223372036854775294 9223372036854775293
0x7ffffffffffffffe 0x8000000000000600 9223372036854775806 9223372036854775805 9223372036854775804 9223372036854775803
0x7fffffffffffffff 0x8000000000000601 9223372036854775807 9223372036854775806 9223372036854775805 9223372036854775804

mlr --opprint put $p0=$p*0;$p1=$p*1;$p2=$p*2;$p3=$p*3 ./reg_test/input/int64arith.dkvp
p                  n                  p0 p1                         p2                          p3
0x7ffffffffffff9ff 0x8000000000000000 0  9223372036854774271        18446744073709547520.000000 27670116110564319232.000000
0x7ffffffffffffa00 0x8000000000000001 0  9223372036854774272        18446744073709547520.000000 27670116110564319232.000000
0x7ffffffffffffbff 0x8000000000000200 0  9223372036854774783        18446744073709549568.000000 27670116110564323328.000000
0x7ffffffffffffc00 0x8000000000000201 0  9223372036854774784        18446744073709549568.000000 27670116110564323328.000000
0x7ffffffffffffdff 0x8000000000000400 0  9223372036854775295        18446744073709549568.000000 27670116110564323328.000000
0x7ffffffffffffe00 0x8000000000000401 0  9223372036854775808.000000 18446744073709551616.000000 27670116110564327424.000000
0x7ffffffffffffffe 0x8000000000000600 0  9223372036854775808.000000 18446744073709551616.000000 27670116110564327424.000000
0x7fffffffffffffff 0x8000000000000601 0  9223372036854775808.000000 18446744073709551616.000000 27670116110564327424.000000

mlr --opprint put $n0=$n+0;$n1=$n+1;$n2=$n+2;$n3=$n+3 ./reg_test/input/int64arith.dkvp
p                  n                  n0                   n1                   n2                   n3
0x7ffffffffffff9ff 0x8000000000000000 -9223372036854775808 -9223372036854775807 -9223372036854775806 -9223372036854775805
0x7ffffffffffffa00 0x8000000000000001 -9223372036854775807 -9223372036854775806 -9223372036854775805 -9223372036854775804
0x7ffffffffffffbff 0x8000000000000200 -9223372036854775296 -9223372036854775295 -9223372036854775294 -9223372036854775293
0x7ffffffffffffc00 0x8000000000000201 -9223372036854775295 -9223372036854775294 -9223372036854775293 -9223372036854775292
0x7ffffffffffffdff 0x8000000000000400 -9223372036854774784 -9223372036854774783 -9223372036854774782 -9223372036854774781
0x7ffffffffffffe00 0x8000000000000401 -9223372036854774783 -9223372036854774782 -9223372036854774781 -9223372036854774780
0x7ffffffffffffffe 0x8000000000000600 -9223372036854774272 -9223372036854774271 -9223372036854774270 -9223372036854774269
0x7fffffffffffffff 0x8000000000000601 -9223372036854774271 -9223372036854774270 -9223372036854774269 -9223372036854774268

mlr --opprint put $n0=$n-0;$n1=$n-1;$n2=$n-2;$n3=$n-3 ./reg_test/input/int64arith.dkvp
p                  n                  n0                   n1                          n2                          n3
0x7ffffffffffff9ff 0x8000000000000000 -9223372036854775808 -9223372036854775808.000000 -9223372036854775808.000000 -9223372036854775808.000000
0x7ffffffffffffa00 0x8000000000000001 -9223372036854775807 -9223372036854775808        -9223372036854775808.000000 -9223372036854775808.000000
0x7ffffffffffffbff 0x8000000000000200 -9223372036854775296 -9223372036854775297        -9223372036854775298        -9223372036854775299
0x7ffffffffffffc00 0x8000000000000201 -9223372036854775295 -9223372036854775296        -9223372036854775297        -9223372036854775298
0x7ffffffffffffdff 0x8000000000000400 -9223372036854774784 -9223372036854774785        -9223372036854774786        -9223372036854774787
0x7ffffffffffffe00 0x8000000000000401 -9223372036854774783 -9223372036854774784        -9223372036854774785        -9223372036854774786
0x7ffffffffffffffe 0x8000000000000600 -9223372036854774272 -9223372036854774273        -9223372036854774274        -9223372036854774275
0x7fffffffffffffff 0x8000000000000601 -9223372036854774271 -9223372036854774272        -9223372036854774273        -9223372036854774274

mlr --opprint put $n0=$n*0;$n1=$n*1;$n2=$n*2;$n3=$n*3 ./reg_test/input/int64arith.dkvp
p                  n                  n0 n1                          n2                           n3
0x7ffffffffffff9ff 0x8000000000000000 0  -9223372036854775808.000000 -18446744073709551616.000000 -27670116110564327424.000000
0x7ffffffffffffa00 0x8000000000000001 0  -9223372036854775808.000000 -18446744073709551616.000000 -27670116110564327424.000000
0x7ffffffffffffbff 0x8000000000000200 0  -9223372036854775808.000000 -18446744073709551616.000000 -27670116110564327424.000000
0x7ffffffffffffc00 0x8000000000000201 0  -9223372036854775295        -18446744073709549568.000000 -27670116110564323328.000000
0x7ffffffffffffdff 0x8000000000000400 0  -9223372036854774784        -18446744073709549568.000000 -27670116110564323328.000000
0x7ffffffffffffe00 0x8000000000000401 0  -9223372036854774783        -18446744073709549568.000000 -27670116110564323328.000000
0x7ffffffffffffffe 0x8000000000000600 0  -9223372036854774272        -18446744073709547520.000000 -27670116110564319232.000000
0x7fffffffffffffff 0x8000000000000601 0  -9223372036854774271        -18446744073709547520.000000 -27670116110564319232.000000


================================================================
STDIN

mlr --csv cat
a,b,c
1,x,3
4,5,6
x,y"yy,z


================================================================
RFC-CSV

mlr --csv cat ./reg_test/input/rfc-csv/simple.csv
a,b,c
1,x,3
4,5,6
x,y"yy,z

mlr --csv cat ./reg_test/input/rfc-csv/simple-truncated.csv
a,b,c
1,x,3
4,5,6

mlr --csv cat ./reg_test/input/rfc-csv/narrow.csv
a
1
2
3
4

mlr --csv cat ./reg_test/input/rfc-csv/narrow-truncated.csv
a
1
2
3
4

mlr --csv cat ./reg_test/input/rfc-csv/quoted-comma.csv
a,b,c
1,"x,3",y
4,5,6

mlr --csv cat ./reg_test/input/rfc-csv/quoted-comma-truncated.csv
a,b,c
1,"x,3",y
4,5,6

mlr --csv cat ./reg_test/input/rfc-csv/quoted-crlf.csv
a,b,c
1,"x
3",y
4,5,6

mlr --csv cat ./reg_test/input/rfc-csv/quoted-crlf-truncated.csv
a,b,c
1,"x
3",y
4,5,6

mlr --csv cat ./reg_test/input/rfc-csv/simple-truncated.csv ./reg_test/input/rfc-csv/simple.csv
a,b,c
1,x,3
4,5,6
1,x,3
4,5,6
x,y"yy,z

mlr --csv --ifs semicolon --ofs pipe --irs lf --ors lflf cut -x -f b ./reg_test/input/rfc-csv/modify-defaults.csv
a|c

1|3

4|6



================================================================
MULTI-CHARACTER IRS/IFS/IPS FOR DKVP

mlr --oxtab --idkvp --mmap --irs lf --ifs , --ips = cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x :0.641593543645736508/
a :wye/
i :0/

x :0.827614412562742041/
a :eks/
i :1/

x :0.923068348748175560/
a :zee/
i :2/

x :0.000047786161325772/
a :zee/
i :3/

x :0.676537984365847889/
a :zee/
i :4/

mlr --oxtab --idkvp --mmap --irs lf --ifs /, --ips =: cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4

mlr --oxtab --idkvp --mmap --irs crlf --ifs , --ips = cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x :0.641593543645736508/
a :wye/
i :0/

x :0.827614412562742041/
a :eks/
i :1/

x :0.923068348748175560/
a :zee/
i :2/

x :0.000047786161325772/
a :zee/
i :3/

x :0.676537984365847889/
a :zee/
i :4/

mlr --oxtab --idkvp --mmap --irs crlf --ifs /, --ips =: cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4

mlr --oxtab --no-mmap --irs lf --ifs , --ips = cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x :0.641593543645736508/
a :wye/
i :0/

x :0.827614412562742041/
a :eks/
i :1/

x :0.923068348748175560/
a :zee/
i :2/

x :0.000047786161325772/
a :zee/
i :3/

x :0.676537984365847889/
a :zee/
i :4/

mlr --oxtab --no-mmap --irs lf --ifs /, --ips =: cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4

mlr --oxtab --no-mmap --irs crlf --ifs , --ips = cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x :0.641593543645736508/
a :wye/
i :0/

x :0.827614412562742041/
a :eks/
i :1/

x :0.923068348748175560/
a :zee/
i :2/

x :0.000047786161325772/
a :zee/
i :3/

x :0.676537984365847889/
a :zee/
i :4/

mlr --oxtab --no-mmap --irs crlf --ifs /, --ips =: cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4


================================================================
MULTI-CHARACTER IRS/IFS FOR NIDX

mlr --oxtab --inidx --mmap --irs lf --ifs , cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508/
1 a=:wye/
3 i=:0/

4 x=:0.827614412562742041/
1 a=:eks/
3 i=:1/

4 x=:0.923068348748175560/
1 a=:zee/
3 i=:2/

4 x=:0.000047786161325772/
1 a=:zee/
3 i=:3/

4 x=:0.676537984365847889/
1 a=:zee/
3 i=:4/

mlr --oxtab --inidx --mmap --irs lf --ifs /, cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508
1 a=:wye
3 i=:0

4 x=:0.827614412562742041
1 a=:eks
3 i=:1

4 x=:0.923068348748175560
1 a=:zee
3 i=:2

4 x=:0.000047786161325772
1 a=:zee
3 i=:3

4 x=:0.676537984365847889
1 a=:zee
3 i=:4

mlr --oxtab --inidx --mmap --irs crlf --ifs , cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508/
1 a=:wye/
3 i=:0/

4 x=:0.827614412562742041/
1 a=:eks/
3 i=:1/

4 x=:0.923068348748175560/
1 a=:zee/
3 i=:2/

4 x=:0.000047786161325772/
1 a=:zee/
3 i=:3/

4 x=:0.676537984365847889/
1 a=:zee/
3 i=:4/

mlr --oxtab --inidx --mmap --irs crlf --ifs /, cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508
1 a=:wye
3 i=:0

4 x=:0.827614412562742041
1 a=:eks
3 i=:1

4 x=:0.923068348748175560
1 a=:zee
3 i=:2

4 x=:0.000047786161325772
1 a=:zee
3 i=:3

4 x=:0.676537984365847889
1 a=:zee
3 i=:4

mlr --oxtab --inidx --no-mmap --irs lf --ifs , cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508/
1 a=:wye/
3 i=:0/

4 x=:0.827614412562742041/
1 a=:eks/
3 i=:1/

4 x=:0.923068348748175560/
1 a=:zee/
3 i=:2/

4 x=:0.000047786161325772/
1 a=:zee/
3 i=:3/

4 x=:0.676537984365847889/
1 a=:zee/
3 i=:4/

mlr --oxtab --inidx --no-mmap --irs lf --ifs /, cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508
1 a=:wye
3 i=:0

4 x=:0.827614412562742041
1 a=:eks
3 i=:1

4 x=:0.923068348748175560
1 a=:zee
3 i=:2

4 x=:0.000047786161325772
1 a=:zee
3 i=:3

4 x=:0.676537984365847889
1 a=:zee
3 i=:4

mlr --oxtab --inidx --no-mmap --irs crlf --ifs , cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508/
1 a=:wye/
3 i=:0/

4 x=:0.827614412562742041/
1 a=:eks/
3 i=:1/

4 x=:0.923068348748175560/
1 a=:zee/
3 i=:2/

4 x=:0.000047786161325772/
1 a=:zee/
3 i=:3/

4 x=:0.676537984365847889/
1 a=:zee/
3 i=:4/

mlr --oxtab --inidx --no-mmap --irs crlf --ifs /, cut -o -f 4,1,3 ./reg_test/input/multi-sep.dkvp
4 x=:0.641593543645736508
1 a=:wye
3 i=:0

4 x=:0.827614412562742041
1 a=:eks
3 i=:1

4 x=:0.923068348748175560
1 a=:zee
3 i=:2

4 x=:0.000047786161325772
1 a=:zee
3 i=:3

4 x=:0.676537984365847889
1 a=:zee
3 i=:4


================================================================
MULTI-CHARACTER IRS/IFS FOR CSVLITE

mlr --oxtab --icsvlite --mmap --irs lf --ifs , cut -o -f x/,a/,i/ ./reg_test/input/multi-sep.csv
x/ 0.641593543645736508/
a/ wye/
i/ 0/

x/ 0.827614412562742041/
a/ eks/
i/ 1/

x/ 0.923068348748175560/
a/ zee/
i/ 2/

x/ 0.000047786161325772/
a/ zee/
i/ 3/

x/ 0.676537984365847889/
a/ zee/
i/ 4/

mlr --oxtab --icsvlite --mmap --irs lf --ifs /, cut -o -f x,a,i ./reg_test/input/multi-sep.csv
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4

mlr --oxtab --icsvlite --mmap --irs crlf --ifs , cut -o -f x/,a/,i/ ./reg_test/input/multi-sep.csv
x/ 0.641593543645736508/
a/ wye/
i/ 0/

x/ 0.827614412562742041/
a/ eks/
i/ 1/

x/ 0.923068348748175560/
a/ zee/
i/ 2/

x/ 0.000047786161325772/
a/ zee/
i/ 3/

x/ 0.676537984365847889/
a/ zee/
i/ 4/

mlr --oxtab --icsvlite --mmap --irs crlf --ifs /, cut -o -f x,a,i ./reg_test/input/multi-sep.csv
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4

mlr --oxtab --icsvlite --no-mmap --irs lf --ifs , cut -o -f x/,a/,i/ ./reg_test/input/multi-sep.csv
x/ 0.641593543645736508/
a/ wye/
i/ 0/

x/ 0.827614412562742041/
a/ eks/
i/ 1/

x/ 0.923068348748175560/
a/ zee/
i/ 2/

x/ 0.000047786161325772/
a/ zee/
i/ 3/

x/ 0.676537984365847889/
a/ zee/
i/ 4/

mlr --oxtab --icsvlite --no-mmap --irs lf --ifs /, cut -o -f x,a,i ./reg_test/input/multi-sep.csv
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4

mlr --oxtab --icsvlite --no-mmap --irs crlf --ifs , cut -o -f x/,a/,i/ ./reg_test/input/multi-sep.csv
x/ 0.641593543645736508/
a/ wye/
i/ 0/

x/ 0.827614412562742041/
a/ eks/
i/ 1/

x/ 0.923068348748175560/
a/ zee/
i/ 2/

x/ 0.000047786161325772/
a/ zee/
i/ 3/

x/ 0.676537984365847889/
a/ zee/
i/ 4/

mlr --oxtab --icsvlite --no-mmap --irs crlf --ifs /, cut -o -f x,a,i ./reg_test/input/multi-sep.csv
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4


================================================================
MULTI-CHARACTER SEPARATORS FOR XTAB

mlr --mmap --xtab --ifs crlf --ofs Z cut -x -f b ./reg_test/input/truncated.xtab-crlf
a 1Zc 3ZZd 4Ze 5Z
mlr --no-mmap --xtab --ifs crlf --ofs Z cut -x -f b ./reg_test/input/truncated.xtab-crlf
a 1Zc 3ZZd 4Ze 5Z
mlr --mmap --xtab --ips . --ops @ cut -x -f b ./reg_test/input/dots.xtab
a@1
c@345

defg@6
hi@@@78

mlr --no-mmap --xtab --ips . --ops @ cut -x -f b ./reg_test/input/dots.xtab
a@1
c@345

defg@6
hi@@@78

mlr --no-mmap --xtab --ips . --ops := cut -x -f b ./reg_test/input/dots.xtab
a:=1
c:=345

defg:=6
hi:=78

mlr --xtab --ips :  --ops @@@@ put $sum=int($a+$b) ./reg_test/input/multi-ips.dkvp
a@@@@1
b@@@@2
sum@@@@3


================================================================
MULTI-CHARACTER IRS FOR PPRINT

mlr --mmap --pprint --irs crlf --ifs / --ofs @ cut -x -f b ./reg_test/input/dots.pprint
a@@@i@@x@@@@@@@@@@@@@@@@@@@y
pan@1@@0.3467901443380824@@0.7268028627434533
eks@2@@0.7586799647899636@@0.5221511083334797
wye@3@@0.20460330576630303@0.33831852551664776
eks@4@@0.38139939387114097@0.13418874328430463
wye@5@@0.5732889198020006@@0.8636244699032729
zee@6@@0.5271261600918548@@0.49322128674835697
eks@7@@0.6117840605678454@@0.1878849191181694
zee@8@@0.5985540091064224@@0.976181385699006
hat@9@@0.03144187646093577@0.7495507603507059
pan@10@0.5026260055412137@@0.9526183602969864

mlr --no-mmap --pprint --irs crlf --ifs / --ofs @ cut -x -f b ./reg_test/input/dots.pprint
a@@@i@@x@@@@@@@@@@@@@@@@@@@y
pan@1@@0.3467901443380824@@0.7268028627434533
eks@2@@0.7586799647899636@@0.5221511083334797
wye@3@@0.20460330576630303@0.33831852551664776
eks@4@@0.38139939387114097@0.13418874328430463
wye@5@@0.5732889198020006@@0.8636244699032729
zee@6@@0.5271261600918548@@0.49322128674835697
eks@7@@0.6117840605678454@@0.1878849191181694
zee@8@@0.5985540091064224@@0.976181385699006
hat@9@@0.03144187646093577@0.7495507603507059
pan@10@0.5026260055412137@@0.9526183602969864


================================================================
MULTI-CHARACTER IXS SPECIFIERS

mlr --oxtab --idkvp --mmap --irs lf --ifs , --ips = cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x :0.641593543645736508/
a :wye/
i :0/

x :0.827614412562742041/
a :eks/
i :1/

x :0.923068348748175560/
a :zee/
i :2/

x :0.000047786161325772/
a :zee/
i :3/

x :0.676537984365847889/
a :zee/
i :4/

mlr --oxtab --idkvp --mmap --irs lf --ifs /, --ips =: cut -o -f x,a,i ./reg_test/input/multi-sep.dkvp
x 0.641593543645736508
a wye
i 0

x 0.827614412562742041
a eks
i 1

x 0.923068348748175560
a zee
i 2

x 0.000047786161325772
a zee
i 3

x 0.676537984365847889
a zee
i 4

