Learn R Programming

pirouette (version 1.6.9)

pir_rename: Rename the filenames in a pir_params using a rename function.

Description

Rename the filenames in a pir_params using a rename function.

Usage

pir_rename(pir_params, rename_fun)

Value

a `pir_params` with renamed filename

Arguments

pir_params

the parameters of pirouette. They are created by create_pir_params.

rename_fun

a function to rename a filename, as can be checked by check_rename_fun. This function should have one argument, which will be a filename or NA. The function should return one filename (when passed one filename) or one NA (when passed one NA). Example rename functions are:

  • get_remove_dir_fun function that removes the directory paths from the filenames, in effect turning these into local files

  • get_replace_dir_fun function that replaces the directory paths from the filenames

Author

Richèl J.C. Bilderbeek