replaceSuffix {rmake} | R Documentation |
Replace suffix of the given file name with a new extension (suffix)
Description
This helper function takes a file name fileName
, removes an extension (a suffix)
from it and adds a new extension newSuffix
.
Usage
replaceSuffix(fileName, newSuffix)
Arguments
fileName |
A character vector with original filenames |
newSuffix |
A new extension to replace old extensions in file names |
Value
A character vector with new file names with old extensions replaced with newSuffix
Author(s)
Michal Burda
Examples
replaceSuffix('filename.Rmd', '.pdf') # 'filename.pdf'
replaceSuffix(c('a.x', 'b.y', 'c.z'), '.csv') # 'a.csv', 'b.csv', 'c.csv'
[Package rmake version 1.1.0 Index]