[R-pkg-devel] About a need for hooks from R CMD ... commands, and a question
Iñaki Ucar
iuc@r @ending from fedor@project@org
Thu Jan 10 12:33:28 CET 2019
It just ocurred to me the following. Instead of
R CMD build pkg
I've tried this:
cd pkg; R CMD build --log `pwd`
and voilà: the tarball includes a log file, and inside there's the
complete path to the DESCRIPTION.
Iñaki
On Wed, 9 Jan 2019 at 20:33, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
>
> On 09/01/2019 11:39 a.m., Dirk Eddelbuettel wrote:
> >
> > Hi Duncan and Iñaki,
> >
> > On 4 January 2019 at 14:13, Duncan Murdoch wrote:
> > | If you want a total hack, the help system can run R code during a build,
> > | e.g. \Sexpr[stage=build]{paste("Built at", Sys.time())}. Certainly it
> > | could embed some information in a help page; perhaps it could do more.
> > | Similarly, vignettes are typically built during R CMD build, so they
> > | might be able to have useful side effects.
> > |
> > | But it seems likely that something less of a kludge would be desirable.
> >
> > A first simple
> >
> > [...]
> >
> > <<preliminaries,echo=FALSE,results=hide>>=
> > user <- Sys.getenv("USER")
> > dir <- getwd()
> > @
> >
> > [...]
> >
> > Built by '\Sexpr{user}' in directory '\Sexpr{dir}'.
> >
> > did not work. By the time that chunk is evaluate, I am already in TEMPDIR.
> >
> > Any clever ideas about I could inject code into the part that creates the tarball?
>
> Same seems to be true for macros in help pages.
>
> Duncan
--
Iñaki Úcar
More information about the R-package-devel
mailing list