Convert file paths to canonical form for the platform, to display them in a user-understandable form and so that relative and absolute paths can be compared.
normalizePath(path, winslash = "\\", mustWork = NA)
| Parameter | Description |
|---|---|
path |
character vector of file paths. |
winslash |
the separator to be used on Windows -- ignored elsewhere. Must be one of c("/", "\\"). |
mustWork |
logical: if TRUE then an error is given if the result cannot be determined; if NA then a warning. |
# NOT RUN {
# random tempdir
cat(normalizePath(c(R.home(), tempdir())), sep = "\n")
# }