Re: [R-pkg-devel] Question regarding listing base and recommended packages programmatically and efficiently

2023-10-12 Thread Ivan Krylov
On Thu, 12 Oct 2023 11:32:24 -0400 Mikael Jagan wrote: > > mk <- file.path(R.home("share"), "make", "vars.mk") > > pp <- sub("^.*= +", "", grep("^R_PKGS_RECOMMENDED", > > readLines(mk), value = TRUE)) > > sort(strsplit(pp, " ")[[1L]]) > [1] "KernSmooth" "MASS"

Re: [R-pkg-devel] Question regarding listing base and recommended packages programmatically and efficiently

2023-10-12 Thread Mikael Jagan
Maybe something like this: > isRecommendedPkg <- utils:::isBasePkg > body(isRecommendedPkg)[[c(3L, 3L)]] <- "recommended" > installed <- unique(list.files(.libPaths())) > installed[vapply(installed, isRecommendedPkg, NA)] [1] "KernSmooth" "MASS" "Matrix" "boot"

Re: [R-pkg-devel] pkg check: SyntaxError: break must be inside loop or switch

2023-10-12 Thread Charles Driver
So apparently there is a corrupted file in the current Stanheaders, which is hopefully fixed soon... On 11/10/2023 9:40 am, Ivan Krylov wrote: > В Tue, 10 Oct 2023 16:36:31 +0200 > Charles Driver пишет: > >>SyntaxError: break must be inside loop or switch > This looks like an error coming

Re: [R-pkg-devel] Question regarding listing base and recommended packages programmatically and efficiently

2023-10-12 Thread Duncan Murdoch
It would be much faster (but slightly less reliable) to use list.files(.libPaths()) to get the names of all installed packages, and then filter them to the known list of base and recommended packages, which changes very rarely. Duncan Murdoch On 12/10/2023 8:34 a.m., Tony Wilkes wrote: Dear

Re: [R-pkg-devel] Question regarding listing base and recommended packages programmatically and efficiently

2023-10-12 Thread Thierry Onkelinx
Dear Tony, Much will depend on what information you need from the output of installed.packages()? Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team

[R-pkg-devel] Question regarding listing base and recommended packages programmatically and efficiently

2023-10-12 Thread Tony Wilkes
Dear all, In my R package that I'm developing, I use `installed.packages(priority = "base")` to programmatically get all core/base R packages (i.e. base, stats, etc.). And similarly, I use installed.packages(priority = "recommended")​` to programmatically get the recommended R packages (i.e.

Re: [R-pkg-devel] Question about Clang 17 Error

2023-10-12 Thread Martin Maechler
> Reed A Cartwright > on Wed, 11 Oct 2023 22:25:35 -0700 writes: > Okay, I'll reach out to the CRAN team shortly. > I wanted to run it by the group here first because my interactions with the > CRAN team haven't always been positive and I need to make sure that I'm not