Learn R Programming

filenamer (version 0.3)

trim_ext: Trim extensions from a file name

Description

This function trims extensions from a file name.

Usage

trim_ext(x, n)

Value

modified object of the original type

Arguments

x

a character or a filename

n

number of extensions to trim off the end

Examples

Run this code
x <- "path/data.txt.gz"
print(trim_ext(x))

Run the code above in your browser using DataLab