detect_file_timestamp: Figure out what date/time stamps on Excel results files would...

View source: R/detect_file_timestamp.R

detect_file_timestampR Documentation

Figure out what date/time stamps on Excel results files would be removed by the function remove_file_timestamp

Description

detect_file_timestamp will find any date/time stamps that have EXACTLY the same format as the Simcyp Autorunner's output. For example: "myfile - 2023-10-31 13-29-15.xlsx" will be noted and, if you run remove_file_timestamp, would become "myfile.xlsx". BE CAREFUL because there's no undo button; your file names will be permanently changed.

Usage

detect_file_timestamp(sim_data_files = NA, regex_to_match = NA)

Arguments

sim_data_files

the Simcyp Simulator results Excel files to clean up. There are three options:

  1. Leave this as NA (default) to remove the date/time stamp from all the Excel files in the current folder.

  2. Set to "recursive" to remove the date/time stamp from all the Excel files in this and all subfolders.

  3. Provide a character vector of the exact files whose date/time stamps you want to remove.

regex_to_match

Optionally provide a text string to use for finding the correct files from which to remove the date/time stamp. For example,if your files all start with "abc1a-", list that here, in quotes, and anything that doesn't contain "abc1a-" will be ignored. Don't include the "xlsx" part of the file name, though, because we'll add that. Wildcards and other regex are acceptable.

Value

a data.frame with the original file names and what the new file names would be if you run remove_file_timestamp

Examples

# None yet



shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.