R/quoteToScale.R

#' Scales a quote. In case log==TRUE this is logarithmic scale, original scale otherwise.
#'
#' @param x a numeric vector of quotes
#' @param log TRUE or FALSE
#'
#' @return scaled quote
quoteToScale <- function(x, log) {
  if (log==TRUE) {
    log(x)
  } else if (log==FALSE) {
    x
  } else {
    stop("Parameter log must be TRUE or FALSE!")
  }
}

Try the rpnf package in your browser

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

rpnf documentation built on May 2, 2019, 5:49 p.m.