A footnote, following an off-list exchange with Prof Ripley, is that I needed
needed to have Suggested or other additional packages installed somewhere
other than .Library .

"The following variables control checks for undeclared/unconditional use of 
other packages. They work by setting up a temporary library directory and 
setting .libPaths() to just that and .Library, so are only effective if 
additional packages are installed somewhere other than .Library.”
[I am not sure of the source of this quote.]

If vignettes make extensive use of Suggested packages,
then exiting early from vignettes when access would otherwise be required to
Suggested package [under knitr, one can use knitr::knit_exit()]  can be an
alternative to leaving out checking of vignettes in order to speed up initial
testing.

On MacOS Mojave with a bash shell
  env _R_CHECK_DEPENDS_ONLY_=true  R CMD check qra_0.2.4.tar.gz
works like a charm.  Some other Unix systems will omit the ‘='


John Maindonald             email: 
john.maindon...@anu.edu.au<mailto:john.maindon...@anu.edu.au>


On 21/10/2021, at 02:31, Dirk Eddelbuettel 
<e...@debian.org<mailto:e...@debian.org>> wrote:


On 20 October 2021 at 09:31, Sebastian Meyer wrote:
| If you set the environment variable inside a running R process, it will
| only affect that process and child processes, but not an independent R
| process launched from a shell like you seem to be doing here:

Yes. That is somewhat common, if obscure, knowledge by those bitten before.

Maybe a line or two could be / should be added to the docs to that effect?

| How to set environment variables is system-specific. On a Unix-like
| system, you could use the command
|
| _R_CHECK_DEPENDS_ONLY_=true  R CMD check qra_0.2.4.tar.gz
|
| to set the environment variable for this R process.
| See, e.g., 
https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEnvironment_variable&amp;data=04%7C01%7Cjohn.maindonald%40anu.edu.au%7Cb519af02f1df454df49208d993cdea27%7Ce37d725cab5c46249ae5f0533e486437%7C0%7C0%7C637703335008269211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=aCCVvvnWQaRxtzxuUJ5lDKcPfMU2BzCJnDRC%2BTa4TnI%3D&amp;reserved=0.

R does have hooks for this, I had these for a few years now:

 ~/.R/check.Renviron
 ~/.R/check.Renviron-Rdevel

Again, might be worthwhile documenting it in the Inst+Admin manual (if it
isn' already, I don't recall right now).

Dirk

--
https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdirk.eddelbuettel.com%2F&amp;data=04%7C01%7Cjohn.maindonald%40anu.edu.au%7Cb519af02f1df454df49208d993cdea27%7Ce37d725cab5c46249ae5f0533e486437%7C0%7C0%7C637703335008269211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=5MTPe0%2Ftqou%2B0DI8%2F7C4NYtM3tJCb4Vpwbe4klWiTco%3D&amp;reserved=0
 | @eddelbuettel | e...@debian.org<mailto:e...@debian.org>


        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to