R/spss.rtrim.R

#' Generate SPSS 'RTRIM' syntax to apply RTRIM() to a string variable.
#'
#' @param str the string argument for RTRIM().
#' @export
#' @examples
#' spss.rtrim("variable_to_be_trimmed")

spss.rtrim <- function(str){
  rtrim.string <- paste0("RTRIM(", str, ")")
  return(rtrim.string)
}

Try the syntaxr package in your browser

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

syntaxr documentation built on May 2, 2019, 3:45 a.m.