check_rename_fun: Check if the rename function is a valid filename rename...

View source: R/check_rename_fun.R

check_rename_funR Documentation

Check if the rename function is a valid filename rename function

Description

Will stop if not

Usage

check_rename_fun(rename_fun)

Arguments

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 get a function that removes the directory paths from the filenames, in effect turning these into local files

  • get_replace_dir_fun get a function that replaces the directory paths from the filenames

  • get_remove_hex_fun get a function that removes the hex string from filenames. For example, tracelog_82c1a522040.log becomes tracelog.log

Value

No return value, called for side effects

Author(s)

Richèl J.C. Bilderbeek


ropensci/beautier documentation built on July 9, 2024, 6:14 a.m.