R/str_if.R

#' brmsMethod: str_if
#' @export

str_if <- function (cond, yes, no = "") {
    cond <- as_one_logical(cond)
    if (cond) 
        as.character(yes)
    else as.character(no)
}
joshuakrobertson/brmsMethods documentation built on Aug. 18, 2020, 1:24 p.m.