powered by
Function to clean paths to surely have a tailing slash or not.
clean_path_name(pathname, remove.slash = FALSE)
The result is the input but with an tailing slash.
A character string. A path name to be cleaned (to have a tailing slash or not).
(boolean) Default: FALSE. Should the result contain the tailing slash or remove it?
# 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