Skip to contents

Clean jamsession name prior to saving an output file

Usage

clean_jamsession_name(
  x,
  remove_pattern = "[-._'\" /\\:]+",
  replacement = "_",
  verbose = FALSE,
  ...
)

Arguments

x

character string representing a jam session name.

remove_pattern

character string regular expression pattern passed to gsub() to define portions of x to be replaced.

replacement

character string replacement, recommended to be a single character.

...

additional arguments are passed to gsub().

Value

character vector after adjusting input 'x'.

Details

This function is intended to take an R session name as a character string, and will replace unwanted characters with a fixed string, by default underscore "_". The remove_pattern and the replacement are configurable if needed.

See also