[Rd] manage R function and data dependencies like 'make'

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 7 19:48:30 CET 2007

R-devel has file_test() in utils (earlier versions had a private version 
in tools).  That has a '-nt' op to do what you need.

file.info() accesses modification dates.

Having said that, I would use 'make' as for example R's own test suites 

On Wed, 7 Feb 2007, Lutz Prechelt wrote:

> Dear R-devels,
> I am looking for a package (or some other infrastructure) for the
> following situation:
> I am doing a larger data evaluation.
> I have several dozen data files and do not want to keep the persistent
> data in the R workspace (for robustness reasons).
> I have several dozen R files, some for reading and preprocessing data
> files, others for doing plots or analyses.
> I will make frequent changes to both data files and R files while doing
> the analysis.
> I would like to automate mechanisms that allow
> - a data file reading function to suppress its actual work if neither
> the data file nor the R file containing the function were modified since
> the data file was last read
> - an R file sourcing function to suppress its actual work if the R file
> has not been modified
> - and perhaps even: automate re-reading a data file upon access to the
> corresponding dataframe iff the file has been modified since the
> dataframe was created.
> In short: Something like Unix's 'make', but for managing dependencies of
> functions and dataframes in addition to files. In R. (And of course I am
> very open for solutions that are more elegant than what I have sketched
> above.)
> I could not find something in the help and have rather few ideas for
> good search terms.
> I any such thing available?
> (If no such infrastructure exists, what is the right R function for
> accessing file modification dates?)
> Thanks!
>  Lutz
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list