R/clean_P.R

Defines functions clean_P

Documented in clean_P

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

Try the psfmi package in your browser

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

psfmi documentation built on July 9, 2023, 7:02 p.m.