R/comparison_operators.R

Defines functions translate_not_equal_sign translate_equal_sign translate_comparison_operators

translate_comparison_operators <- function(equation) {
  equal_translated     <- translate_equal_sign(equation)
  not_equal_translated <- translate_not_equal_sign(equal_translated)
}

translate_equal_sign <- function(equation) {
  new_equation <- stringr::str_replace_all(equation, "(?<!<|>|=|!)=(?!=)", "==")
}

translate_not_equal_sign <- function(equation) {
  new_equation <- stringr::str_replace_all(equation, "<>", "!=")
}

Try the readsdr package in your browser

Any scripts or data that you put into this service are public.

readsdr documentation built on Jan. 13, 2021, 11:08 a.m.