powered by
Extract File Extension
file_extension(x, ext = NULL)
a character vector.
path as a character vector.
extension to append instead of the original extension.
file_extension('alpha.txt') file_extension(paste('aa.tt', 1:5, sep='')) # change extension file_extension(paste('aa.tt', 1:5, sep=''), 'pdf') file_extension(paste('aatt', 1:5, sep=''), 'pdf')
Run the code above in your browser using DataLab