Track files created while knitting?

Is there any way to get a manifest of files created after running an RMarkdown document? For example, it's easy to know what plots were created from the document because they all live in the same place.

If I have a chunk my RMarkdown document that downloads/generates data or other files, is there a way to track when and where these files were created other than querying the project for recently modified files (which excludes files that would be written outside the project)?

When we start to talk about tracking/watching files, we are getting into the territory of pipeline tools. The targets package is a pipeline tool for R that integrates well with R Markdown. The user manual has a section on literate programming.

I think R Markdown reports are most effective when they are lightweight: mostly prose, minimal code, fast execution, and no outputs other than the rendered HTML/PDF document. It helps to have a scalable pipeline to take care of the bulk of the computation up front prior to the report itself. In the targets package, R Markdown reports are just targets that document upstream results. The code chunks in the actual reports are terse calls to tar_read() and tar_load().

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.