
mlr --j2p --from ./reg-test/input/typecast.json put 
  $t       = typeof($a);
  $string  = string($a);
  $int     = int($a);
  $float   = float($a);
  $boolean = boolean($a);
 then reorder -f t,a
t      a     string int     float   boolean
string abc   abc    (error) (error) (error)
int    0     0      0       0       false
int    2     2      2       2       true
float  0.0   0.0    0       0.0     false
float  2.3   2.3    2       2.3     true
bool   false false  0       0       false
bool   true  true   1       1       true
string 0     0      0       0       (error)
string 2     2      2       2       (error)
string 0.0   0.0    (error) 0       (error)
string 2.3   2.3    (error) 2.3     (error)
string false false  (error) (error) false
string true  true   (error) (error) true

mlr --idkvp --opprint --from ./reg-test/input/s.dkvp put 
  for (k, v in $*) {
    $["t".k] = typeof(v)
  }
  $tnonesuch = typeof($nonesuch)

a   b   i x                   y                   ta     tb     ti  tx    ty    tnonesuch
pan pan 1 0.3467901443380824  0.7268028627434533  string string int float float absent
eks pan 2 0.7586799647899636  0.5221511083334797  string string int float float absent
wye wye 3 0.20460330576630303 0.33831852551664776 string string int float float absent
eks wye 4 0.38139939387114097 0.13418874328430463 string string int float float absent

mlr --idkvp --opprint --from ./reg-test/input/s.dkvp put 
  for (k, v in $*) {
    $["s".k] = string(v)
  }
  $snonesuch = string($nonesuch)

a   b   i x                   y                   sa  sb  si sx                  sy                  snonesuch
pan pan 1 0.3467901443380824  0.7268028627434533  pan pan 1  0.3467901443380824  0.7268028627434533  (absent)
eks pan 2 0.7586799647899636  0.5221511083334797  eks pan 2  0.7586799647899636  0.5221511083334797  (absent)
wye wye 3 0.20460330576630303 0.33831852551664776 wye wye 3  0.20460330576630303 0.33831852551664776 (absent)
eks wye 4 0.38139939387114097 0.13418874328430463 eks wye 4  0.38139939387114097 0.13418874328430463 (absent)

