R/forwardSlash.r

Defines functions forwardSlash

Documented in forwardSlash

#' Replace backslash with forward slash
#'
#' This function is helpful for Windows systems, where paths are usually expressed with left slashes, whereas \code{R} requires right slashes.
#'
#' @param x A string.
#'
#' @return Character.
#' 
#' @examples
#' 
#' forwardSlash("C:\\ecology\\main project")
#'
#' @export
forwardSlash <- function(x) gsub("\\\\", "/", x)

Try the omnibus package in your browser

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

omnibus documentation built on Sept. 17, 2024, 5:09 p.m.