The aim with \Rfun{ProvideSampleId()} is to supply a unique sample ID from any full path supplied to it. The function solves this using two approaches: \begin{enumerate} \item using only the filename, \item using only the name of the subdirectory in question. \end{enumerate}