trim_ext: Trim extensions from a file name

Description Usage Arguments Value Examples

Description

This function trims extensions from a file name.

Usage

1
trim_ext(x, n)

Arguments

x

a character or a filename

n

number of extensions to trim off the end

Value

modified object of the original type

Examples

1
2
x <- "path/data.txt.gz"
print(trim_ext(x))

Example output

[1] "path/data.txt"

filenamer documentation built on May 1, 2019, 9:10 p.m.