R/clean_P.R

Defines functions clean_P

Documented in clean_P

#' Function to clean variables
#'
#' @return "Clean" version of variables. For internal use.
#'
#' @author Martijn Heymans, 2020
#' @keywords internal
#'
#' @export
clean_P <-
  function(variable){
    variable <-
      gsub(paste(c("factor", "[()]",
                   "rcs", ",", " ",
                   c(3:7)), collapse = "|"),
           "", variable)
    return(variable)
}

Try the miceafter package in your browser

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

miceafter documentation built on Oct. 2, 2022, 5:08 p.m.