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

addBeforFileExtension

Add text before file-extension


Description

This function helps changing charater srings like file-names and allows adding the character vector 'add' (length 1) before the extension (defined by last '.') of the input string 'x'. Used for easily creating variants/additional filenames but keeping current extension.

Usage

addBeforFileExtension(x, add, sep = "_")

Arguments

x

main character vector

add

character vector to be added

sep

(character) separator between 'x' & 'add' (character, length 1)

Value

modified character vector

Examples

addBeforFileExtension(c("abd.txt","ghg.ijij.txt","kjh"),"new")

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

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