removeFileExtension: File

View source: R/misc.R

removeFileExtensionR Documentation

File

Description

Remove extension(s) from a file name.

Usage

removeFileExtension(file, fileext)

Arguments

file

character (will be passed to strsplit)

fileext

character containing a regular expression (will be passed to strsplit)

Value

character

Author(s)

Timothee Flutre

Examples

f <- "data.txt.gz"
removeFileExtension(file=f, fileext="\\.gz")
removeFileExtension(file=f, fileext="\\.txt\\.gz")

timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.