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 = ",")
}

Try the frostr package in your browser

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

frostr documentation built on Aug. 3, 2020, 5:08 p.m.