R/sanitizeSpaces.R

Defines functions sanitizeSpaces

Documented in sanitizeSpaces

#' Escape spaces in a string as needed in file names used in Makefile files
#'
#' @param x A character vector to be sanitized
#' @return A character vector with spaces replaced by `\ `
#' @author Michal Burda
#' @export
sanitizeSpaces <- function(x) {
  gsub(" ", "\\ ", x, fixed=TRUE)
}

Try the rmake package in your browser

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

rmake documentation built on Aug. 26, 2025, 5:09 p.m.