diff --git a/c/dsl/function_manager.c b/c/dsl/function_manager.c index 3d4b3c33f..ff0acc27d 100644 --- a/c/dsl/function_manager.c +++ b/c/dsl/function_manager.c @@ -329,7 +329,7 @@ static function_lookup_t FUNCTION_LOOKUP_TABLE[] = { {FUNC_CLASS_TYPING, "is_present", 1,0, "True if field is present in input, false otherwise."}, {FUNC_CLASS_TYPING, "is_string", 1,0, "True if field is present with string (including empty-string) value"}, - {FUNC_CLASS_TYPING, "asserting_absent", 1,0, "Returns argument if it is absent in the input ata, else throws an error."}, + {FUNC_CLASS_TYPING, "asserting_absent", 1,0, "Returns argument if it is absent in the input data, else throws an error."}, {FUNC_CLASS_TYPING, "asserting_bool", 1,0, "Returns argument if it is present with boolean value, else throws an error."}, {FUNC_CLASS_TYPING, "asserting_boolean", 1,0, "Returns argument if it is present with boolean value, else throws an error."}, {FUNC_CLASS_TYPING, "asserting_empty", 1,0, "Returns argument if it is present in input with empty value, else throws an error."}, diff --git a/c/todo.txt b/c/todo.txt index d1074837c..5bb467929 100644 --- a/c/todo.txt +++ b/c/todo.txt @@ -8,9 +8,11 @@ BUGFIXES ! windows port +* mlrfunc docsection: + - POKI_RUN_UNESCAPED + * rh/fedora/centos * ship ./configure, w/ clean-target mods -? mlrfunc docsection? * start a draft-5.1.0-relnotes.md - incl. json-skip-arrays-on-input @@ -170,6 +172,7 @@ COMPARES: 5.2.0 IDEAS: * json_encode / json_decode functions? (map->string and string->map) + - array handling ... * strptime/strftime: - strptime w/ fractional seconds. maybe %OS? diff --git a/doc/content-for-reference-dsl.html b/doc/content-for-reference-dsl.html index 8fe40f2ca..fe5d4baf4 100644 --- a/doc/content-for-reference-dsl.html +++ b/doc/content-for-reference-dsl.html @@ -1216,7 +1216,1140 @@ notion of optional or default-on-absent arguments. All argument-passing is positional rather than by name; arguments are passed by value, not by reference. -POKI_RUN_COMMAND{{mlr --help-all-functions | fmt -80}}HERE +
You can get a list of all functions using mlr -F. + +++ ++ +- +- +* +/ +// +% +** +| +^ +& +~ +<< +>> +== +!= +=~ +!=~ +> +>= +< +<= +&& +|| +^^ +! +? : +. ++
+abs (class=math #args=1): Absolute value. ++
+acos (class=math #args=1): Inverse trigonometric cosine. ++
+acosh (class=math #args=1): Inverse hyperbolic cosine. ++
+asin (class=math #args=1): Inverse trigonometric sine. ++
+asinh (class=math #args=1): Inverse hyperbolic sine. ++
+asserting_absent (class=typing #args=1): Returns argument if it is absent in the +input ata, else throws an error. ++
+asserting_bool (class=typing #args=1): Returns argument if it is present with +boolean value, else throws an error. ++
+asserting_boolean (class=typing #args=1): Returns argument if it is present with +boolean value, else throws an error. ++
+asserting_empty (class=typing #args=1): Returns argument if it is present in +input with empty value, else throws an error. ++
+asserting_empty_map (class=typing #args=1): Returns argument if it is a map with +empty value, else throws an error. ++
+asserting_float (class=typing #args=1): Returns argument if it is present with +float value, else throws an error. ++
+asserting_int (class=typing #args=1): Returns argument if it is present with int +value, else throws an error. ++
+asserting_map (class=typing #args=1): Returns argument if it is a map, else +throws an error. ++
+asserting_nonempty_map (class=typing #args=1): Returns argument if it is a +non-empty map, else throws an error. ++
+asserting_not_empty (class=typing #args=1): Returns argument if it is present in +input with non-empty value, else throws an error. ++
+asserting_not_map (class=typing #args=1): Returns argument if it is not a map, +else throws an error. ++
+asserting_not_null (class=typing #args=1): Returns argument if it is non-null +(non-empty and non-absent), else throws an error. ++
+asserting_null (class=typing #args=1): Returns argument if it is null (empty or +absent), else throws an error. ++
+asserting_numeric (class=typing #args=1): Returns argument if it is present with +int or float value, else throws an error. ++
+asserting_present (class=typing #args=1): Returns argument if it is present in +input, else throws an error. ++
+asserting_string (class=typing #args=1): Returns argument if it is present with +string (including empty-string) value, else throws an error. ++
+atan (class=math #args=1): One-argument arctangent. ++
+atan2 (class=math #args=2): Two-argument arctangent. ++
+atanh (class=math #args=1): Inverse hyperbolic tangent. ++
+boolean (class=conversion #args=1): Convert int/float/bool/string to boolean. ++
+cbrt (class=math #args=1): Cube root. ++
+ceil (class=math #args=1): Ceiling: nearest integer at or above. ++
+cos (class=math #args=1): Trigonometric cosine. ++
+cosh (class=math #args=1): Hyperbolic cosine. ++
+depth (class=maps #args=1): Prints maximum depth of hashmap: ''. Scalars have +depth 0. ++
+dhms2fsec (class=time #args=1): Recovers floating-point seconds as in
+dhms2fsec("5d18h53m20.250000s") = 500000.250000
+
+
+dhms2sec (class=time #args=1): Recovers integer seconds as in
+dhms2sec("5d18h53m20s") = 500000
+
++erf (class=math #args=1): Error function. ++
+erfc (class=math #args=1): Complementary error function. ++
+exp (class=math #args=1): Exponential function e**x. ++
+expm1 (class=math #args=1): e**x - 1. ++
+float (class=conversion #args=1): Convert int/float/bool/string to float. ++
+floor (class=math #args=1): Floor: nearest integer at or below. ++
+fmtnum (class=conversion #args=2): Convert int/float/bool to string using +printf-style format string, e.g. '$s = fmtnum($n, "%06lld")'. ++
+fsec2dhms (class=time #args=1): Formats floating-point seconds as in +fsec2dhms(500000.25) = "5d18h53m20.250000s" ++
+fsec2hms (class=time #args=1): Formats floating-point seconds as in +fsec2hms(5000.25) = "01:23:20.250000" ++
+gmt2sec (class=time #args=1): Parses GMT timestamp as integer seconds since the +epoch. ++
+gsub (class=string #args=3): Example: '$name=gsub($name, "old", "new")' (replace +all). ++
+haskey (class=maps #args=2): True/false if map has/hasn't key, e.g. 'haskey($*, +"a")' or 'haskey(mymap, mykey)'. Error if 1st argument is not a map. ++
+hexfmt (class=conversion #args=1): Convert int to string, e.g. 255 to "0xff". ++
+hms2fsec (class=time #args=1): Recovers floating-point seconds as in
+hms2fsec("01:23:20.250000") = 5000.250000
+
+
+hms2sec (class=time #args=1): Recovers integer seconds as in hms2sec("01:23:20")
+= 5000
+
++int (class=conversion #args=1): Convert int/float/bool/string to int. ++
+invqnorm (class=math #args=1): Inverse of normal cumulative distribution +function. Note that invqorm(urand()) is normally distributed. ++
+is_absent (class=typing #args=1): False if field is present in input, false +otherwise ++
+is_bool (class=typing #args=1): True if field is present with boolean value. +Synonymous with is_boolean. ++
+is_boolean (class=typing #args=1): True if field is present with boolean value. +Synonymous with is_bool. ++
+is_empty (class=typing #args=1): True if field is present in input with empty +string value, false otherwise. ++
+is_empty_map (class=typing #args=1): True if argument is a map which is empty. ++
+is_float (class=typing #args=1): True if field is present with value inferred to +be float ++
+is_int (class=typing #args=1): True if field is present with value inferred to +be int ++
+is_map (class=typing #args=1): True if argument is a map. ++
+is_nonempty_map (class=typing #args=1): True if argument is a map which is +non-empty. ++
+is_not_empty (class=typing #args=1): False if field is present in input with +empty value, false otherwise ++
+is_not_map (class=typing #args=1): True if argument is not a map. ++
+is_not_null (class=typing #args=1): False if argument is null (empty or absent), +true otherwise. ++
+is_null (class=typing #args=1): True if argument is null (empty or absent), +false otherwise. ++
+is_numeric (class=typing #args=1): True if field is present with value inferred +to be int or float ++
+is_present (class=typing #args=1): True if field is present in input, false +otherwise. ++
+is_string (class=typing #args=1): True if field is present with string +(including empty-string) value ++
+joink (class=maps #args=2): Makes string from map keys. E.g. 'joink($*, ",")'. ++
+joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g. +'joinkv(@v[2], "=", ",")' ++
+joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap, +",")'. ++
+leafcount (class=maps #args=1): Counts total number of terminal values in +hashmap. For single-level maps, same as length. ++
+length (class=maps #args=1): Counts number of top-level entries in hashmap. +Scalars have length 1. ++
+log (class=math #args=1): Natural (base-e) logarithm. ++
+log10 (class=math #args=1): Base-10 logarithm. ++
+log1p (class=math #args=1): log(1-x). ++
+logifit (class=math #args=3): Given m and b from logistic regression, compute +fit: $yhat=logifit($x,$m,$b). ++
+madd (class=math #args=3): a + b mod m (integers) ++
+mapdiff (class=maps variadic): With 0 args, returns empty map. With 1 arg, +returns copy of arg. With 2 or more, returns copy of arg 1 with all keys from +any of remaining argument maps removed. ++
+mapsum (class=maps variadic): With 0 args, returns empty map. With >= 1 arg,
+returns a map with key-value pairs from all arguments. Rightmost collisions win,
+e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'.
+
++max (class=math variadic): max of n numbers; null loses ++
+mexp (class=math #args=3): a ** b mod m (integers) ++
+min (class=math variadic): Min of n numbers; null loses ++
+mmul (class=math #args=3): a * b mod m (integers) ++
+msub (class=math #args=3): a - b mod m (integers) ++
+pow (class=math #args=2): Exponentiation; same as **. ++
+qnorm (class=math #args=1): Normal cumulative distribution function. ++
+round (class=math #args=1): Round to nearest integer. ++
+roundm (class=math #args=2): Round to nearest multiple of m: roundm($x,$m) is +the same as round($x/$m)*$m ++
+sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000) = +"5d18h53m20s" ++
+sec2gmt (class=time #args=1): Formats seconds since epoch (integer part) as GMT +timestamp, e.g. sec2gmt(1440768801.7) = "2015-08-28T13:33:21Z". Leaves +non-numbers as-is. ++
+sec2gmtdate (class=time #args=1): Formats seconds since epoch (integer part) as +GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) = +"2015-08-28". Leaves non-numbers as-is. ++
+sec2hms (class=time #args=1): Formats integer seconds as in sec2hms(5000) = +"01:23:20" ++
+sgn (class=math #args=1): +1 for positive input, 0 for zero input, -1 for +negative input. ++
+sin (class=math #args=1): Trigonometric sine. ++
+sinh (class=math #args=1): Hyperbolic sine. ++
+splitkv (class=maps #args=3): Splits string by separators into map with type
+inference. E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c"
+: 3}'.
+
+
+splitkvx (class=maps #args=3): Splits string by separators into map without type
+inference (keys and values are strings). E.g. 'splitkv("a=1,b=2,c=3", "=", ",")'
+gives '{"a" : "1", "b" : "2", "c" : "3"}'.
+
+
+splitnv (class=maps #args=2): Splits string by separator into integer-indexed
+map with type inference. E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b",
+3 : "c"}'.
+
+
+splitnvx (class=maps #args=2): Splits string by separator into integer-indexed
+map without type inference (values are strings). E.g. 'splitnv("4,5,6" , ",")'
+gives '{1 : "4", 2 : "5", 3 : "6"}'.
+
++sqrt (class=math #args=1): Square root. ++
+strftime (class=time #args=2): Formats seconds since epoch (integer part) as +timestamp, e.g. strftime(1440768801.7,"%Y-%m-%dT%H:%M:%SZ") = +"2015-08-28T13:33:21Z". ++
+string (class=conversion #args=1): Convert int/float/bool/string to string. ++
+strlen (class=string #args=1): String length. ++
+strptime (class=time #args=2): Parses timestamp as integer seconds since epoch,
+e.g. strptime("2015-08-28T13:33:21Z","%Y-%m-%dT%H:%M:%SZ") = 1440768801.
+
++sub (class=string #args=3): Example: '$name=sub($name, "old", "new")' (replace +once). ++
+substr (class=string #args=3): substr(s,m,n) gives substring of s from 0-up +position m to n inclusive. Negative indices -len .. -1 alias to 0 .. len-1. ++
+systime (class=time #args=0): Floating-point seconds since the epoch, e.g. +1440768801.748936. ++
+tan (class=math #args=1): Trigonometric tangent. ++
+tanh (class=math #args=1): Hyperbolic tangent. ++
+tolower (class=string #args=1): Convert string to lowercase. ++
+toupper (class=string #args=1): Convert string to uppercase. ++
+typeof (class=conversion #args=1): Convert argument to type of argument (e.g. +MT_STRING). For debug. ++
+urand (class=math #args=0): Floating-point numbers on the unit interval. +Int-valued example: '$n=floor(20+urand()*11)'. ++
+urand32 (class=math #args=0): Integer uniformly distributed 0 and 2**32-1 +inclusive. ++
+urandint (class=math #args=2): Integer uniformly distributed between inclusive +integer endpoints. ++
-$ mlr --help-all-functions | fmt -80 -+ (class=arithmetic #args=2): Addition. - -+ (class=arithmetic #args=1): Unary plus. - -- (class=arithmetic #args=2): Subtraction. - -- (class=arithmetic #args=1): Unary minus. - -* (class=arithmetic #args=2): Multiplication. - -/ (class=arithmetic #args=2): Division. - -// (class=arithmetic #args=2): Integer division: rounds to negative (pythonic). - -% (class=arithmetic #args=2): Remainder; never negative-valued (pythonic). - -** (class=arithmetic #args=2): Exponentiation; same as pow, but as an infix -operator. - -| (class=arithmetic #args=2): Bitwise OR. - -^ (class=arithmetic #args=2): Bitwise XOR. - -& (class=arithmetic #args=2): Bitwise AND. - -~ (class=arithmetic #args=1): Bitwise NOT. Beware '$y=~$x' since =~ is the -regex-match operator: try '$y = ~$x'. - -<< (class=arithmetic #args=2): Bitwise left-shift. - ->> (class=arithmetic #args=2): Bitwise right-shift. - -== (class=boolean #args=2): String/numeric equality. Mixing number and string -results in string compare. - -!= (class=boolean #args=2): String/numeric inequality. Mixing number and string -results in string compare. - -=~ (class=boolean #args=2): String (left-hand side) matches regex (right-hand -side), e.g. '$name =~ "^a.*b$"'. - -!=~ (class=boolean #args=2): String (left-hand side) does not match regex -(right-hand side), e.g. '$name !=~ "^a.*b$"'. - -> (class=boolean #args=2): String/numeric greater-than. Mixing number and string -results in string compare. - ->= (class=boolean #args=2): String/numeric greater-than-or-equals. Mixing number -and string results in string compare. - -< (class=boolean #args=2): String/numeric less-than. Mixing number and string -results in string compare. - -<= (class=boolean #args=2): String/numeric less-than-or-equals. Mixing number -and string results in string compare. - -&& (class=boolean #args=2): Logical AND. - -|| (class=boolean #args=2): Logical OR. - -^^ (class=boolean #args=2): Logical XOR. - -! (class=boolean #args=1): Logical negation. - -? : (class=boolean #args=3): Ternary operator. - -. (class=string #args=2): String concatenation. - -gsub (class=string #args=3): Example: '$name=gsub($name, "old", "new")' (replace -all). - -strlen (class=string #args=1): String length. - -sub (class=string #args=3): Example: '$name=sub($name, "old", "new")' (replace -once). - -substr (class=string #args=3): substr(s,m,n) gives substring of s from 0-up -position m to n inclusive. Negative indices -len .. -1 alias to 0 .. len-1. - -tolower (class=string #args=1): Convert string to lowercase. - -toupper (class=string #args=1): Convert string to uppercase. - abs (class=math #args=1): Absolute value. ++
acos (class=math #args=1): Inverse trigonometric cosine. ++
acosh (class=math #args=1): Inverse hyperbolic cosine. ++
asin (class=math #args=1): Inverse trigonometric sine. ++
asinh (class=math #args=1): Inverse hyperbolic sine. ++
asserting_absent (class=typing #args=1): Returns argument if it is absent in the input ata, else throws an error. ++
asserting_bool (class=typing #args=1): Returns argument if it is present with boolean value, else throws an error. ++
asserting_boolean (class=typing #args=1): Returns argument if it is present with boolean value, else throws an error. ++
asserting_empty (class=typing #args=1): Returns argument if it is present in input with empty value, else throws an error. ++
asserting_empty_map (class=typing #args=1): Returns argument if it is a map with empty value, else throws an error. ++
asserting_float (class=typing #args=1): Returns argument if it is present with float value, else throws an error. ++
asserting_int (class=typing #args=1): Returns argument if it is present with int value, else throws an error. ++
asserting_map (class=typing #args=1): Returns argument if it is a map, else throws an error. ++
asserting_nonempty_map (class=typing #args=1): Returns argument if it is a non-empty map, else throws an error. ++
asserting_not_empty (class=typing #args=1): Returns argument if it is present in input with non-empty value, else throws an error. ++
asserting_not_map (class=typing #args=1): Returns argument if it is not a map, else throws an error. ++
asserting_not_null (class=typing #args=1): Returns argument if it is non-null (non-empty and non-absent), else throws an error. ++
asserting_null (class=typing #args=1): Returns argument if it is null (empty or absent), else throws an error. ++
asserting_numeric (class=typing #args=1): Returns argument if it is present with int or float value, else throws an error. ++
asserting_present (class=typing #args=1): Returns argument if it is present in input, else throws an error. ++
asserting_string (class=typing #args=1): Returns argument if it is present with string (including empty-string) value, else throws an error. ++
+atan (class=math #args=1): One-argument arctangent. ++
+atan2 (class=math #args=2): Two-argument arctangent. ++
+atanh (class=math #args=1): Inverse hyperbolic tangent. ++
boolean (class=conversion #args=1): Convert int/float/bool/string to boolean. ++
+cbrt (class=math #args=1): Cube root. ++
+ceil (class=math #args=1): Ceiling: nearest integer at or above. ++
+cos (class=math #args=1): Trigonometric cosine. ++
+cosh (class=math #args=1): Hyperbolic cosine. ++
depth (class=maps #args=1): Prints maximum depth of hashmap: ''. Scalars have depth 0. ++
+dhms2fsec (class=time #args=1): Recovers floating-point seconds as in
+dhms2fsec("5d18h53m20.250000s") = 500000.250000
+
+
+dhms2sec (class=time #args=1): Recovers integer seconds as in
+dhms2sec("5d18h53m20s") = 500000
+
++erf (class=math #args=1): Error function. ++
+erfc (class=math #args=1): Complementary error function. ++
+exp (class=math #args=1): Exponential function e**x. ++
+expm1 (class=math #args=1): e**x - 1. ++
+float (class=conversion #args=1): Convert int/float/bool/string to float. ++
+floor (class=math #args=1): Floor: nearest integer at or below. ++
+fmtnum (class=conversion #args=2): Convert int/float/bool to string using +printf-style format string, e.g. '$s = fmtnum($n, "%06lld")'. ++
+fsec2dhms (class=time #args=1): Formats floating-point seconds as in +fsec2dhms(500000.25) = "5d18h53m20.250000s" ++
+fsec2hms (class=time #args=1): Formats floating-point seconds as in +fsec2hms(5000.25) = "01:23:20.250000" ++
+gmt2sec (class=time #args=1): Parses GMT timestamp as integer seconds since the +epoch. ++
+gsub (class=string #args=3): Example: '$name=gsub($name, "old", "new")' (replace +all). ++
haskey (class=maps #args=2): True/false if map has/hasn't key, e.g. 'haskey($*, "a")' or 'haskey(mymap, mykey)'. Error if 1st argument is not a map. ++
+hexfmt (class=conversion #args=1): Convert int to string, e.g. 255 to "0xff". ++
+hms2fsec (class=time #args=1): Recovers floating-point seconds as in
+hms2fsec("01:23:20.250000") = 5000.250000
+
+
+hms2sec (class=time #args=1): Recovers integer seconds as in hms2sec("01:23:20")
+= 5000
+
++int (class=conversion #args=1): Convert int/float/bool/string to int. ++
+invqnorm (class=math #args=1): Inverse of normal cumulative distribution +function. Note that invqorm(urand()) is normally distributed. ++
+is_absent (class=typing #args=1): False if field is present in input, false +otherwise ++
+is_bool (class=typing #args=1): True if field is present with boolean value. +Synonymous with is_boolean. ++
+is_boolean (class=typing #args=1): True if field is present with boolean value. +Synonymous with is_bool. ++
+is_empty (class=typing #args=1): True if field is present in input with empty +string value, false otherwise. ++
+is_empty_map (class=typing #args=1): True if argument is a map which is empty. ++
+is_float (class=typing #args=1): True if field is present with value inferred to +be float ++
+is_int (class=typing #args=1): True if field is present with value inferred to +be int ++
+is_map (class=typing #args=1): True if argument is a map. ++
+is_nonempty_map (class=typing #args=1): True if argument is a map which is +non-empty. ++
+is_not_empty (class=typing #args=1): False if field is present in input with +empty value, false otherwise ++
+is_not_map (class=typing #args=1): True if argument is not a map. ++
+is_not_null (class=typing #args=1): False if argument is null (empty or absent), +true otherwise. ++
+is_null (class=typing #args=1): True if argument is null (empty or absent), +false otherwise. ++
+is_numeric (class=typing #args=1): True if field is present with value inferred +to be int or float ++
+is_present (class=typing #args=1): True if field is present in input, false +otherwise. ++
+is_string (class=typing #args=1): True if field is present with string +(including empty-string) value ++
joink (class=maps #args=2): Makes string from map keys. E.g. 'joink($*, ",")'. ++
joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g. 'joinkv(@v[2], "=", ",")' ++
joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap, ",")'. ++
leafcount (class=maps #args=1): Counts total number of terminal values in hashmap. For single-level maps, same as length. ++
length (class=maps #args=1): Counts number of top-level entries in hashmap. Scalars have length 1. ++
+log (class=math #args=1): Natural (base-e) logarithm. ++
+log10 (class=math #args=1): Base-10 logarithm. ++
+log1p (class=math #args=1): log(1-x). ++
+logifit (class=math #args=3): Given m and b from logistic regression, compute +fit: $yhat=logifit($x,$m,$b). ++
+madd (class=math #args=3): a + b mod m (integers) ++
mapdiff (class=maps variadic): With 0 args, returns empty map. With 1 arg, returns copy of arg. With 2 or more, returns copy of arg 1 with all keys from any of remaining argument maps removed. ++
+mapsum (class=maps variadic): With 0 args, returns empty map. With >= 1 arg,
returns a map with key-value pairs from all arguments. Rightmost collisions win,
e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'.
+
++max (class=math variadic): max of n numbers; null loses ++
+mexp (class=math #args=3): a ** b mod m (integers) ++
+min (class=math variadic): Min of n numbers; null loses ++
+mmul (class=math #args=3): a * b mod m (integers) ++
+msub (class=math #args=3): a - b mod m (integers) ++
+pow (class=math #args=2): Exponentiation; same as **. ++
+qnorm (class=math #args=1): Normal cumulative distribution function. ++
+round (class=math #args=1): Round to nearest integer. ++
+roundm (class=math #args=2): Round to nearest multiple of m: roundm($x,$m) is +the same as round($x/$m)*$m ++
+sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000) = +"5d18h53m20s" ++
+sec2gmt (class=time #args=1): Formats seconds since epoch (integer part) as GMT +timestamp, e.g. sec2gmt(1440768801.7) = "2015-08-28T13:33:21Z". Leaves +non-numbers as-is. ++
+sec2gmtdate (class=time #args=1): Formats seconds since epoch (integer part) as +GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) = +"2015-08-28". Leaves non-numbers as-is. ++
+sec2hms (class=time #args=1): Formats integer seconds as in sec2hms(5000) = +"01:23:20" ++
+sgn (class=math #args=1): +1 for positive input, 0 for zero input, -1 for +negative input. ++
+sin (class=math #args=1): Trigonometric sine. ++
+sinh (class=math #args=1): Hyperbolic sine. ++
splitkv (class=maps #args=3): Splits string by separators into map with type
inference. E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c"
: 3}'.
+
+
splitkvx (class=maps #args=3): Splits string by separators into map without type
inference (keys and values are strings). E.g. 'splitkv("a=1,b=2,c=3", "=", ",")'
gives '{"a" : "1", "b" : "2", "c" : "3"}'.
+
+
splitnv (class=maps #args=2): Splits string by separator into integer-indexed
map with type inference. E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b",
3 : "c"}'.
+
+
splitnvx (class=maps #args=2): Splits string by separator into integer-indexed
map without type inference (values are strings). E.g. 'splitnv("4,5,6" , ",")'
gives '{1 : "4", 2 : "5", 3 : "6"}'.
-
-To set the seed for urand, you may specify decimal or hexadecimal 32-bit numbers
-of the form "mlr --seed 123456789" or "mlr --seed 0xcafefeed". Miller's
-built-in variables are NF, NR, FNR, FILENUM, and FILENAME (awk-like) along with
-the mathematical constants PI and E.
+sqrt (class=math #args=1): Square root. ++
+strftime (class=time #args=2): Formats seconds since epoch (integer part) as +timestamp, e.g. strftime(1440768801.7,"%Y-%m-%dT%H:%M:%SZ") = +"2015-08-28T13:33:21Z". ++
+string (class=conversion #args=1): Convert int/float/bool/string to string. ++
+strlen (class=string #args=1): String length. ++
+strptime (class=time #args=2): Parses timestamp as integer seconds since epoch,
+e.g. strptime("2015-08-28T13:33:21Z","%Y-%m-%dT%H:%M:%SZ") = 1440768801.
+
++sub (class=string #args=3): Example: '$name=sub($name, "old", "new")' (replace +once). ++
+substr (class=string #args=3): substr(s,m,n) gives substring of s from 0-up +position m to n inclusive. Negative indices -len .. -1 alias to 0 .. len-1. ++
+systime (class=time #args=0): Floating-point seconds since the epoch, e.g. +1440768801.748936. ++
+tan (class=math #args=1): Trigonometric tangent. ++
+tanh (class=math #args=1): Hyperbolic tangent. ++
+tolower (class=string #args=1): Convert string to lowercase. ++
+toupper (class=string #args=1): Convert string to uppercase. ++
+typeof (class=conversion #args=1): Convert argument to type of argument (e.g. +MT_STRING). For debug. ++
+urand (class=math #args=0): Floating-point numbers on the unit interval. +Int-valued example: '$n=floor(20+urand()*11)'. ++
+urand32 (class=math #args=0): Integer uniformly distributed 0 and 2**32-1 +inclusive. ++
+urandint (class=math #args=2): Integer uniformly distributed between inclusive +integer endpoints. ++