Michael Hoffman
2008-Feb-20 23:02 UTC
[R] Automatically discovering dependencies in Sweave
I am using Sweave in a Makefile-managed LaTeX project. I regenerate the .tex files automatically when there are changes in the Rnw files, but this also needs to be done when files that are sourced using source() are changed. Is there something that can be done using codetools to discover all the sourced files? I suppose one thing I could to would be to make a wrapper for source() that would log all of the files accessed. Or maybe even more generally for file(), but that would probably produce a lot of things I don't want as dependencies.