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

View source: R/pir_rename.R

pir_renameR Documentation

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)

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

Value

a 'pir_params' with renamed filename

Author(s)

Richèl J.C. Bilderbeek


richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.