FilenameMapper-class: Make sure to call $readMappingFile(some_file) if you want to support a user-defined file mapping.
Otherwise, calls to $getShortNames() will create/augment the mapping for filenames.
Description
Make sure to call $readMappingFile(some_file) if you want to support a user-defined file mapping.
Otherwise, calls to $getShortNames() will create/augment the mapping for filenames.
Arguments
Fields
raw_file_mapping
Data.frame with columns 'from', 'to' and maybe 'best.effort' (if shorting was unsuccessful)
mapping.creation
how the current mapping was obtained (user or auto)
external.mapping.file
Filename of user-defined mapping file; only defined if readMappingFile() was called
Static method: Shorten a set of Raw file names and return a data frame with the mappings.
Mapping will have: $from, $to and optionally $best.effort (if shorting was unsuccessful and numbers had to be used)
raw.files Vector of Raw files.
max_len Maximal length of shortening results, before resorting to canonical names (file 1,...).
fallbackStartNr Starting index for canonical names.