[R-pkg-devel] About a need for hooks from R CMD ... commands, and a question
Kyle Baron
kyleb @ending from metrumrg@com
Thu Jan 10 23:44:42 CET 2019
Will this work for you?
I had to stash the working directory (when R CMD build is run) in an
environment variable via ~/.R/build.Renviron`
$ cat ~/.R/build.Renviron
OLDWD=${PWD}
But a Makefile tucked in vignettes directory will run and the two
files will be there in the built package. For me, I couldn't get
OLDPWD so I saved it as OLDWD instead
$ tree vignettes/
vignettes/
├── Makefile
└── Untitled.Rmd
$ more vignettes/Makefile
all:
echo ${OLDWD} > ../inst/old.txt
echo ${PWD} > ../inst/current.txt
Kyle
On Thu, Jan 10, 2019 at 3:51 PM Dirk Eddelbuettel <edd using debian.org> wrote:
>
>
> On 10 January 2019 at 22:33, Iñaki Ucar wrote:
> | On Thu, 10 Jan 2019 at 21:55, Dirk Eddelbuettel <edd using debian.org> wrote:
> | > Comes up with an empty / unset olddir when I do
> | >
> | > R CMD build someNameHere; R CMD INSTALL someNameHere_1.2.3.tar.gz
> |
> | This is quite interesting. Because if you run
> |
> | R CMD build someNameHere/; R CMD INSTALL someNameHere_1.2.3.tar.gz
> |
> | (note the "/" after the package name) then the olddir is there.
>
> Not for me. Same result as before. (That is as work on CentOS 7.5 with R 3.5.1).
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
--
Kyle Baron | Principal Scientist I
Metrum Research Group
More information about the R-package-devel
mailing list