R/internal_opfuns.R

Defines functions .op_raw_byte .op_bit .op_cplx_math .op_cplx_rel .op_str_dist .op_str_conc .op_str_rel .op_b .op_int_rel .op_int_math .op_dec_rel .op_dec_math .op_rel

#' @keywords internal
#' @noRd
.op_rel <- function() {
  return(c("==", "!=", "<", ">", "<=", ">="))
}


#' @keywords internal
#' @noRd
.op_dec_math <- function() {
  return(c("+", "-", "*", "/", "^", "pmin", "pmax"))
}

#' @keywords internal
#' @noRd
.op_dec_rel <- function() {
  return(c("==", "!=", "<", ">", "<=", ">=", "d==", "d!=", "d<", "d>", "d<=", "d>="))
}

#' @keywords internal
#' @noRd
.op_int_math <- function() {
  return(c("+", "-", "*", "gcd", "%%", "%/%", "^", "pmin", "pmax"))
}

#' @keywords internal
#' @noRd
.op_int_rel <- function() {
  return(c("==", "!=", "<", ">", "<=", ">="))
}


#' @keywords internal
#' @noRd
.op_b <- function() {
  return(c("&", "|", "xor", "nand", "==", "!=", "<", ">", "<=", ">="))
}

#' @keywords internal
#' @noRd
.op_str_rel <- function() {
  return(c("==", "!="))
}

#' @keywords internal
#' @noRd
.op_str_conc <- function() {
  return(c("+"))
}


#' @keywords internal
#' @noRd
.op_str_dist <- function() {
  return(c("levenshtein"))
}

#' @keywords internal
#' @noRd
.op_cplx_rel <- function() {
  return(c("==", "!="))
}

#' @keywords internal
#' @noRd
.op_cplx_math <- function() {
  return(c("+", "-", "*", "/"))
}


#' @keywords internal
#' @noRd
.op_bit <- function() {
  return(c("&", "|", "xor", "nand", "==", "!=", "<", ">", "<=", ">=", "<<", ">>"))
}


#' @keywords internal
#' @noRd
.op_raw_byte <- function() {
  return(c("==", "!=", "<", ">", "<=", ">=", "pmin", "pmax", "diff"))
}

Try the broadcast package in your browser

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

broadcast documentation built on Sept. 15, 2025, 5:08 p.m.