Afternoon everyone.
We use rmarkdown from within Rstudio to write technical reports. These reports rely on external ascii (usually) datafiles which are read into dataframes and manipulated.
We also use RCS for version control as it gives us nice sequential numbering of report versions (1.1, 1.2 etc), date of checkin, author revision etc using the RCS variables.
Our problem is that if we have an Rmd file which calls in a bunch of other data files, and the datafiles change (for example, our QA department find a typo in a datafile which is changed), if we check in the Rmd file, nothing will change version control wise because the Rmd file itself hasn't changed, only files which it is dependant on.
We know we could ask users to run "ci -f" (to force a checkin) but they are so used to using the standard RCS command ("ci -l", "co -l" etc) that I'm fairly certain they would forget to add "-f".
Is there some way to have rstudio add a date/time tag into the YAML block each time the file is knitted ? If that worked then when the lab tech came to produce a new version of the report, once they had knitted it to preview and were ready to generate the final report, we know that the Rmd file would be checked in and the version control info increased/updated.
We have been wondering about using a Makefile of course, but that would involve building a list of dependencies of the external datafiles, and that is non trivial (datafiles may be dispersed throughout different directories in a project, and may not have their full pathname in the Rmd file if a function is doing the hard lifting, so we may have some cases where we parsed a file and couldn't find the dependencies).
Whilst I appreciate that forcing the file to change each time you knit it is a sledgehammer to crack a nut, it may be an interim solution for us.
Any thoughts much appreciated.
Pete