
mlr --csvlite --opprint merge-fields -a p0,min,p29,max,p100,sum -c _in,_out ./reg-test/input/merge-fields-in-out.csv
a_p0 a_min a_p29 a_max a_p100 a_sum b_p0 b_min b_p29 b_max b_p100 b_sum
436  436   436   490   490    926   195  195   195   446   446    641
320  320   320   526   526    846   780  780   780   963   963    1743
220  220   220   888   888    1108  705  705   705   831   831    1536

mlr --csvlite --opprint merge-fields -k -a p0,min,p29,max,p100,sum -c _in,_out ./reg-test/input/merge-fields-in-out.csv
a_in a_out b_in b_out a_p0 a_min a_p29 a_max a_p100 a_sum b_p0 b_min b_p29 b_max b_p100 b_sum
436  490   446  195   436  436   436   490   490    926   195  195   195   446   446    641
526  320   963  780   320  320   320   526   526    846   780  780   780   963   963    1743
220  888   705  831   220  220   220   888   888    1108  705  705   705   831   831    1536

mlr --csvlite --opprint merge-fields -i -a p0,min,p29,max,p100,sum -c _in,_out ./reg-test/input/merge-fields-in-out.csv
a_p0       a_min a_p29      a_max a_p100 a_sum b_p0       b_min b_p29      b_max b_p100 b_sum
436.000000 436   451.660000 490   490    926   195.000000 195   267.790000 446   446    641
320.000000 320   379.740000 526   526    846   780.000000 780   833.070000 963   963    1743
220.000000 220   413.720000 888   888    1108  705.000000 705   741.540000 831   831    1536

mlr --csvlite --opprint merge-fields -i -k -a p0,min,p29,max,p100,sum -c _in,_out ./reg-test/input/merge-fields-in-out.csv
a_in a_out b_in b_out a_p0       a_min a_p29      a_max a_p100 a_sum b_p0       b_min b_p29      b_max b_p100 b_sum
436  490   446  195   436.000000 436   451.660000 490   490    926   195.000000 195   267.790000 446   446    641
526  320   963  780   320.000000 320   379.740000 526   526    846   780.000000 780   833.070000 963   963    1743
220  888   705  831   220.000000 220   413.720000 888   888    1108  705.000000 705   741.540000 831   831    1536

mlr --csvlite --opprint merge-fields -a p0,min,p29,max,p100 -c _in,_out ./reg-test/input/merge-fields-in-out-mixed.csv
a_p0 a_min a_p29 a_max a_p100 b_p0 b_min b_p29 b_max b_p100
436  436   436   abc   abc    195  195   195   446   446
320  320   320   526   526    780  780   780   def   def
220  220   220   888   888    705  705   705   ghi   ghi
jkl  jkl   jkl   mno   mno    pqr  pqr   pqr   stu   stu

mlr --csvlite --opprint merge-fields -k -a p0,min,p29,max,p100 -c _in,_out ./reg-test/input/merge-fields-in-out-mixed.csv
a_in a_out b_in b_out a_p0 a_min a_p29 a_max a_p100 b_p0 b_min b_p29 b_max b_p100
436  abc   446  195   436  436   436   abc   abc    195  195   195   446   446
526  320   def  780   320  320   320   526   526    780  780   780   def   def
220  888   705  ghi   220  220   220   888   888    705  705   705   ghi   ghi
jkl  mno   pqr  stu   jkl  jkl   jkl   mno   mno    pqr  pqr   pqr   stu   stu

mlr --oxtab merge-fields -k -a p0,min,p29,max,p100,sum,count -f a_in_x,a_out_x -o foo ./reg-test/input/merge-fields-abxy.dkvp
a_in_x    1
a_out_x   2
b_in_y    4
b_out_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

z         1
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_out_x   2
b_in_y    4
b_out_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_out_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

a_in_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

z         2
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_out_x   2
b_on_y    4
b_out_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_on_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_in_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

z         3
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_in_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_on_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

z         4
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

mlr --oxtab merge-fields -k -a p0,min,p29,max,p100,sum,count -r in_,out_ -o bar ./reg-test/input/merge-fields-abxy.dkvp
a_in_x    1
a_out_x   2
b_in_y    4
b_out_x   8
bar_p0    1
bar_min   1
bar_p29   2
bar_max   8
bar_p100  8
bar_sum   15
bar_count 4

z         1
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_on_x    1
a_out_x   2
b_in_y    4
b_out_x   8
bar_p0    2
bar_min   2
bar_p29   2
bar_max   8
bar_p100  8
bar_sum   14
bar_count 3

a_in_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   8
bar_p100  8
bar_sum   13
bar_count 3

a_in_x    1
a_out_x   2
b_on_y    4
b_out_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   8
bar_p100  8
bar_sum   11
bar_count 3

a_in_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   4
bar_p100  4
bar_sum   7
bar_count 3

z         2
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_on_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
bar_p0    4
bar_min   4
bar_p29   4
bar_max   8
bar_p100  8
bar_sum   12
bar_count 2

a_on_x    1
a_out_x   2
b_on_y    4
b_out_x   8
bar_p0    2
bar_min   2
bar_p29   2
bar_max   8
bar_p100  8
bar_sum   10
bar_count 2

a_on_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
bar_p0    2
bar_min   2
bar_p29   2
bar_max   4
bar_p100  4
bar_sum   6
bar_count 2

a_in_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   8
bar_p100  8
bar_sum   9
bar_count 2

a_in_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   4
bar_p100  4
bar_sum   5
bar_count 2

a_in_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   2
bar_p100  2
bar_sum   3
bar_count 2

z         3
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_in_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   1
bar_p100  1
bar_sum   1
bar_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
bar_p0    2
bar_min   2
bar_p29   2
bar_max   2
bar_p100  2
bar_sum   2
bar_count 1

a_on_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
bar_p0    4
bar_min   4
bar_p29   4
bar_max   4
bar_p100  4
bar_sum   4
bar_count 1

a_on_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
bar_p0    8
bar_min   8
bar_p29   8
bar_max   8
bar_p100  8
bar_sum   8
bar_count 1

z         4
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_on_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

mlr --oxtab merge-fields -k -a p0,min,p29,max,p100,sum,count -c in_,out_ ./reg-test/input/merge-fields-abxy.dkvp
a_in_x    1
a_out_x   2
b_in_y    4
b_out_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

z 1

a_on_x    1
a_out_x   2
b_in_y    4
b_out_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_out_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

z 2

a_on_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_out_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_on_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

a_in_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2

z 3

a_in_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1

a_on_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

a_on_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

z 4

a_on_x  1
a_oot_x 2
b_on_y  4
b_oot_x 8

mlr --oxtab merge-fields -i -k -a p0,min,p29,max,p100,sum,count -f a_in_x,a_out_x -o foo ./reg-test/input/merge-fields-abxy.dkvp
a_in_x    1
a_out_x   2
b_in_y    4
b_out_x   8
foo_p0    1.000000
foo_min   1
foo_p29   1.290000
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

z         1
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_out_x   2
b_in_y    4
b_out_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_out_x   8
foo_p0    1.000000
foo_min   1
foo_p29   1.290000
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

a_in_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
foo_p0    1.000000
foo_min   1
foo_p29   1.290000
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

z         2
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_out_x   2
b_on_y    4
b_out_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_on_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_in_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
foo_p0    1.000000
foo_min   1
foo_p29   1.290000
foo_max   2
foo_p100  2
foo_sum   3
foo_count 2

z         3
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_in_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
foo_p0    1
foo_min   1
foo_p29   1
foo_max   1
foo_p100  1
foo_sum   1
foo_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
foo_p0    2
foo_min   2
foo_p29   2
foo_max   2
foo_p100  2
foo_sum   2
foo_count 1

a_on_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

z         4
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

a_on_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
foo_p0    
foo_min   
foo_p29   
foo_max   
foo_p100  
foo_sum   0
foo_count 0

mlr --oxtab merge-fields -i -k -a p0,min,p29,max,p100,sum,count -r in_,out_ -o bar ./reg-test/input/merge-fields-abxy.dkvp
a_in_x    1
a_out_x   2
b_in_y    4
b_out_x   8
bar_p0    1.000000
bar_min   1
bar_p29   1.870000
bar_max   8
bar_p100  8
bar_sum   15
bar_count 4

z         1
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_on_x    1
a_out_x   2
b_in_y    4
b_out_x   8
bar_p0    2.000000
bar_min   2
bar_p29   3.160000
bar_max   8
bar_p100  8
bar_sum   14
bar_count 3

a_in_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
bar_p0    1.000000
bar_min   1
bar_p29   2.740000
bar_max   8
bar_p100  8
bar_sum   13
bar_count 3

a_in_x    1
a_out_x   2
b_on_y    4
b_out_x   8
bar_p0    1.000000
bar_min   1
bar_p29   1.580000
bar_max   8
bar_p100  8
bar_sum   11
bar_count 3

a_in_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
bar_p0    1.000000
bar_min   1
bar_p29   1.580000
bar_max   4
bar_p100  4
bar_sum   7
bar_count 3

z         2
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_on_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
bar_p0    4.000000
bar_min   4
bar_p29   5.160000
bar_max   8
bar_p100  8
bar_sum   12
bar_count 2

a_on_x    1
a_out_x   2
b_on_y    4
b_out_x   8
bar_p0    2.000000
bar_min   2
bar_p29   3.740000
bar_max   8
bar_p100  8
bar_sum   10
bar_count 2

a_on_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
bar_p0    2.000000
bar_min   2
bar_p29   2.580000
bar_max   4
bar_p100  4
bar_sum   6
bar_count 2

a_in_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
bar_p0    1.000000
bar_min   1
bar_p29   3.030000
bar_max   8
bar_p100  8
bar_sum   9
bar_count 2

a_in_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
bar_p0    1.000000
bar_min   1
bar_p29   1.870000
bar_max   4
bar_p100  4
bar_sum   5
bar_count 2

a_in_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
bar_p0    1.000000
bar_min   1
bar_p29   1.290000
bar_max   2
bar_p100  2
bar_sum   3
bar_count 2

z         3
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_in_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
bar_p0    1
bar_min   1
bar_p29   1
bar_max   1
bar_p100  1
bar_sum   1
bar_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
bar_p0    2
bar_min   2
bar_p29   2
bar_max   2
bar_p100  2
bar_sum   2
bar_count 1

a_on_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
bar_p0    4
bar_min   4
bar_p29   4
bar_max   4
bar_p100  4
bar_sum   4
bar_count 1

a_on_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
bar_p0    8
bar_min   8
bar_p29   8
bar_max   8
bar_p100  8
bar_sum   8
bar_count 1

z         4
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

a_on_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
bar_p0    
bar_min   
bar_p29   
bar_max   
bar_p100  
bar_sum   0
bar_count 0

mlr --oxtab merge-fields -i -k -a p0,min,p29,max,p100,sum,count -c in_,out_ ./reg-test/input/merge-fields-abxy.dkvp
a_in_x    1
a_out_x   2
b_in_y    4
b_out_x   8
a_x_p0    1.000000
a_x_min   1
a_x_p29   1.290000
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

z 1

a_on_x    1
a_out_x   2
b_in_y    4
b_out_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_out_x   8
a_x_p0    1.000000
a_x_min   1
a_x_p29   1.290000
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
a_x_p0    1.000000
a_x_min   1
a_x_p29   1.290000
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

z 2

a_on_x    1
a_oot_x   2
b_in_y    4
b_out_x   8
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_out_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_on_x    1
a_out_x   2
b_in_y    4
b_oot_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

a_in_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

a_in_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

a_in_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
a_x_p0    1.000000
a_x_min   1
a_x_p29   1.290000
a_x_max   2
a_x_p100  2
a_x_sum   3
a_x_count 2

z 3

a_in_x    1
a_oot_x   2
b_on_y    4
b_oot_x   8
a_x_p0    1
a_x_min   1
a_x_p29   1
a_x_max   1
a_x_p100  1
a_x_sum   1
a_x_count 1

a_on_x    1
a_out_x   2
b_on_y    4
b_oot_x   8
a_x_p0    2
a_x_min   2
a_x_p29   2
a_x_max   2
a_x_p100  2
a_x_sum   2
a_x_count 1

a_on_x    1
a_oot_x   2
b_in_y    4
b_oot_x   8
b_y_p0    4
b_y_min   4
b_y_p29   4
b_y_max   4
b_y_p100  4
b_y_sum   4
b_y_count 1

a_on_x    1
a_oot_x   2
b_on_y    4
b_out_x   8
b_x_p0    8
b_x_min   8
b_x_p29   8
b_x_max   8
b_x_p100  8
b_x_sum   8
b_x_count 1

z 4

a_on_x  1
a_oot_x 2
b_on_y  4
b_oot_x 8

