R/frost_csl.R

Defines functions frost_csl `%||%`

# FROST INFIX OPERATOR ----
# Create an infix operator for the `frost_csl()` function

`%||%` <- function(lhs, rhs) {
  if (!is.null(lhs)) rhs
  else lhs
}

# FROST CSL ----
# Create a comma-separated list of the vector of inputs for some parameter

frost_csl <- function(parameter) {
  parameter <- unique(parameter)
  parameter %||% paste(parameter, collapse = ",")
}
PersianCatsLikeToMeow/frostr documentation built on Aug. 6, 2020, 7:15 p.m.