filename_replace: filename_replace

Description Usage Arguments Examples

View source: R/filename_replace.R

Description

Replace a string in a filename with another string.

Usage

1
filename_replace(filepath = ".", from, to, verbose = TRUE)

Arguments

filepath

Path to files. Defaults to current directory.

from

String to find.

to

String to replace it with.

verbose

Logical. Should it print descriptions of any changes?

Examples

1
2
3
4
folder <- "FCS_trimmed"
filename_replace(filepath = folder, from="iptg", to="IPTG")
filename_replace(filepath = folder, from="100ngmlatc", to="100")
filename_replace(filepath = folder, from="_something_", to="_")

ec363/filenamer documentation built on March 22, 2020, 2:16 a.m.