powered by
As opposed to basename(), this function returns the pure basename of one or multiple file names, i.e. without extension.
basename()
pureBasename(path, slash = FALSE)
File name(s) without extension as character.
character
File name(s) as character.
A logical determining whether to add a leading slash ("/") to the returned file name.
logical
"/"
Florian Detsch
tools::file_path_sans_ext().
tools::file_path_sans_ext()
ifl = tempfile(fileext = ".tif") pureBasename(ifl) pureBasename(ifl, slash = TRUE)
Run the code above in your browser using DataLab