math_to_function | R Documentation |
Takes a string like "<0" and outputs a function to test for that condition. Returns a boolean.
math_to_function(str, convert_equal = T, silent_try = T, test_function = T)
str |
(chr scalar) A string of a half math conditional |
convert_equal |
(log scalar) Converts = to ==. Default=T. |
silent_try |
(log scalar) Whether to use a silent trial. Default=T. Change to F to get potentially useful debugging information. |
test_function |
(log scalar) Whether to test the function. This is done by trying on 0. Default=T. |
math_to_function("<0")(-1) #check if -1<0
math_to_function("=0")(1234) #check if 1235=0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.