Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

file_extension

Extract File Extension


Description

Extract File Extension

Usage

file_extension(x, ext = NULL)

Arguments

x

path as a character vector.

ext

extension to append instead of the original extension.

Examples

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')

pkgmaker

Development Utilities for R Packages

v0.32.2
GPL (>= 2)
Authors
Renaud Gaujoux [aut, cre]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.