Learn R Programming

DIZutils (version 0.0.13)

clean_path_name: clean_path_name helper function

Description

Function to clean paths to surely have a tailing slash or not.

Usage

clean_path_name(pathname, remove.slash = FALSE)

Arguments

pathname

A character string. A path name to be cleaned (to have a tailing slash or not).

remove.slash

(boolean) Default: FALSE. Should the result contain the tailing slash or remove it?

Value

The result is the input but with an tailing slash.

Examples

Run this code
# NOT RUN {
# Both function calls will return "home/test/"
clean_path_name("home/test")
clean_path_name("home/test/")

# }

Run the code above in your browser using DataLab