[R-pkg-devel] About a need for hooks from R CMD ... commands, and a question
Dirk Eddelbuettel
edd @ending from debi@n@org
Thu Jan 10 21:54:55 CET 2019
On 9 January 2019 at 17:57, Iñaki Ucar wrote:
| Did you check Sys.getenv("OLDPWD")? I checked with a knitr vignette
| and the correct path was there.
Code:
[...]
<<preliminaries,echo=FALSE,results=hide>>=
prettyVersion <- packageVersion("someNameHere")
prettyDate <- format(Sys.Date(), "%B %e, %Y")
user <- Sys.getenv("USER")
dir <- getwd()
olddir <- Sys.getenv("OLDPWD")
@
[...]
\date{Built on \Sexpr{prettyDate} using version \Sexpr{prettyVersion}}
\maketitle
Built by '\Sexpr{user}' in directory '\Sexpr{dir}' coming from directory
'\Sexpr{olddir}'.
Comes up with an empty / unset olddir when I do
R CMD build someNameHere; R CMD INSTALL someNameHere_1.2.3.tar.gz
No mas :-/
Your idea about the logfile is fair, but I would *much* prefer to have
something unconditional.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list