Watch an input file continuously and knit it when it is updated
Source:R/utils-conversion.R
knit_watch.RdCheck the modification time of an input file continously in an infinite loop. Whenever the time indicates the file has been modified, call a function to recompile the input file.
Arguments
- input
An input file path, or a character vector of mutiple input file paths.
- compile
A function to compile the
inputfile. This could be e.g.knitorknit2pdf, depending on the input file and the output you want.- interval
A time interval to pause in each cycle of the infinite loop.
- ...
Other arguments to be passed to the
compilefunction.