Re: [R-pkg-devel] callr and CRAN policy on the max number of cores

2024-05-22 Thread Henrik Bengtsson
Two parallel processes are okay, so you can use two callr background processes ("children"), as long as you don't do heavy computations on the main R process ("parent"). This is commonly done in many R packages, e.g. library(parallel) cl <- makeCluster(2) y <- parLapply(cl = cl, X = 1:10, fun =

Re: [R-pkg-devel] Fast Matrix Serialization in R?

2024-05-09 Thread Henrik Bengtsson
On Thu, May 9, 2024 at 3:46 PM Simon Urbanek wrote: > > > > > On 9/05/2024, at 11:58 PM, Vladimir Dergachev > > wrote: > > > > > > > > On Thu, 9 May 2024, Sameh Abdulah wrote: > > > >> Hi, > >> > >> I need to serialize and save a 20K x 20K matrix as a binary file. This > >> process is

Re: [R-pkg-devel] puzzling removal of 'dotwhisker' from CRAN

2024-04-18 Thread Henrik Bengtsson
On Thu, Apr 18, 2024 at 6:41 AM Uwe Ligges wrote: > > On 18.04.2024 15:35, Ben Bolker wrote: > > Yes, but ffbase was archived a long time ago (2022-04-04) and CRAN > > has apparently just caught up to checking. What's a little frustrating > > (to me) is that the dependence of prediction on

Re: [R-pkg-devel] Unusually long execution time for R.utils::gzip on r-devel-windows

2024-02-17 Thread Henrik Bengtsson
RtmpURWeVC" [9] "15.02.2024 04:00 RtmpUrwhHU" [ reached getOption("max.print") -- omitted 17165 entries ] Time difference of 18.67841 secs So, yeah, wow! I'll look into fixing this, probably by removing this fallback approach, which is very rarely n

Re: [R-pkg-devel] Unusually long execution time for R.utils::gzip on r-devel-windows

2024-02-16 Thread Henrik Bengtsson
Author of R.utils here. I happen to investigate this too right now, because of extremely slow win-builder performance of R.rsp checks, which in turn depends on R.utils. It's not obvious to me why this happens on win-builder. I've noticed slower and slower win-builder/cran-incoming checks over the

Re: [R-pkg-devel] new maintainer for CRAN package XML

2024-01-25 Thread Henrik Bengtsson
Some thoughts for what the next steps could be: I could be wrong, but I doubt that there's someone out there that wants to pick up 'XML' and start developing it beyond keeping the lights on. I also think the community agrees that 'xml2' is the recommended package to use for XML-related needs.

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Henrik Bengtsson
On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: > > G'day Duncon, > > On Thu, 25 Jan 2024 11:27:50 -0500 > Duncan Murdoch wrote: > > > On 25/01/2024 11:18 a.m., Henrik Bengtsson wrote: > [...] > > I think you're right that syntax errors in help page

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Henrik Bengtsson
On Thu, Jan 25, 2024 at 8:27 AM Duncan Murdoch wrote: > > On 25/01/2024 11:18 a.m., Henrik Bengtsson wrote: > > On Thu, Jan 25, 2024 at 7:48 AM Duncan Murdoch > > wrote: > >> > >> On 25/01/2024 10:27 a.m., Josiah Parry wrote: > >>> Hey all, >

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Henrik Bengtsson
On Thu, Jan 25, 2024 at 7:48 AM Duncan Murdoch wrote: > > On 25/01/2024 10:27 a.m., Josiah Parry wrote: > > Hey all, > > > > I've encountered use of the native pipe operator in the examples for > > 'httr2' e.g. > > > > request("http://example.com;) |> req_dry_run() > > > > > > Since r-oldrel

Re: [R-pkg-devel] Wrong mailing list: Could the 100 byte path length limit be lifted?

2023-12-13 Thread Henrik Bengtsson
On Wed, Dec 13, 2023 at 8:06 AM McGrath, Justin M wrote: > > On Windows, packages will be in "C:\Users\[User > Name]\Documents\R\win-library\[R version]\[Package Name]". In R (>= 4.2.0), the default R_LIBS_USER path has moved to under LOCALAPPDATA, e.g. "C:\Users\[User

Re: [R-pkg-devel] Canonical way to Rprintf R_xlen_t

2023-11-29 Thread Henrik Bengtsson
On Tue, Nov 28, 2023 at 1:21 PM Tomas Kalibera wrote: > > > On 11/28/23 21:50, Henrik Bengtsson wrote: > > Daniel, I get those compiler warnings for '%td" MS Windows. It works > > fine on Linux. > > Please let me clarify. %td works in R on Windows in

Re: [R-pkg-devel] Canonical way to Rprintf R_xlen_t

2023-11-28 Thread Henrik Bengtsson
to debug these things. > > PS. I also tried using rhub, but it takes a long time and often results in a > PREPERROR. > > On Nov 28, 2023, at 3:58 PM, Henrik Bengtsson > wrote: > > CAUTION: The Sender of this email is not from within Dalhousie. > > "%td&q

Re: [R-pkg-devel] Canonical way to Rprintf R_xlen_t

2023-11-28 Thread Henrik Bengtsson
"%td" is not supported on all platforms/compilers. This is what I got when I added it to 'matrixStats'; * using log directory 'D:/a/matrixStats/matrixStats/check/matrixStats.Rcheck' * using R Under development (unstable) (2023-11-26 r85638 ucrt) * using platform: x86_64-w64-mingw32 * R was

[R-pkg-devel] CRAN archival: Does CRAN un-archive some packages automatically?

2023-11-01 Thread Henrik Bengtsson
I'm asking here to spare the CRAN Team a direct message, but also because the answer is of interest to others: Consider a package PkgA that was archived on CRAN, because it fails checks and errors that were not corrected in time. At the moment when package PkgA is archived, it will trigger

Re: [R-pkg-devel] Suppressing long-running vignette code in CRAN submission

2023-10-17 Thread Henrik Bengtsson
On Tue, Oct 17, 2023 at 12:45 PM John Fox wrote: > > Hello Dirk, > > Thank you for the additional information. > > As you suggest, what you did to distribute pre-built PDF vignettes is > quite similar to what R.rsp does, except that the latter also supports > pre-built HTML vignettes, which is

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

2023-10-14 Thread Henrik Bengtsson
On Sat, Oct 14, 2023 at 5:25 AM Martin Maechler wrote: > > > Ivan Krylov > > on Thu, 12 Oct 2023 18:50:30 +0300 writes: > > > On Thu, 12 Oct 2023 11:32:24 -0400 > > Mikael Jagan wrote: > > >> > mk <- file.path(R.home("share"), "make", "vars.mk") > >> > pp <- sub("^.*=

Re: [R-pkg-devel] DESCRIPTION file Imports of base R packages

2023-10-03 Thread Henrik Bengtsson
On Tue, Oct 3, 2023 at 7:46 AM Jan Gorecki wrote: > > Hello, > > I noticed some packages define Imports in DESCRIPTION file listing base R > packages like methods, utils, etc. > > My question is that if it is necessary to list those* dependencies in > DESCRIPTION file, or is it enough to have

Re: [R-pkg-devel] Check package without suggests

2023-07-19 Thread Henrik Bengtsson
Hello, this is *not* a new behavior on CRAN, at least on (re-)submissions to CRAN. The package has to pass R CMD check --as-cran with all OK. If one of the Suggests:ed package is not installed, but one of your examples or package tests needed it, that would be detected by the check system. The

Re: [R-pkg-devel] CRAN check fails on NEWS

2023-04-26 Thread Henrik Bengtsson
To reproduce this, you can use tools:::.news_reader_default(), e.g. > utils::download.file("https://raw.githubusercontent.com/gertvv/rsmaa/master/smaa/NEWS;, > "NEWS", quiet = TRUE) > news <- tools:::.news_reader_default("NEWS") Warning messages: 1: Cannot process chunk/lines: smaa 0.3-0 2:

Re: [R-pkg-devel] NOTEs - Problems with news in 'NEWS.md'

2022-12-12 Thread Henrik Bengtsson
I've got a check_news() function to test that a NEWS.md can be parsed as expected. See attached file (if that gets dropped in the interwebs, it's also at https://gist.github.com/HenrikBengtsson/2361371be4ae8681b3ee2eb361730990). Call it in the folder where the NEWS.md file is. My $.02 /Henrik

Re: [R-pkg-devel] [UNCLASSIFIED] Remotes in description when submitting a package until a dependency is fixed

2022-11-16 Thread Henrik Bengtsson
Not sure if it's already been said, but note that we can only use 'Additional_repositories' for *optional* dependencies, which are listed under 'Suggests' (and less used 'Enhances'). We cannot use them for *hard* dependencies, which are listed under 'Depends' or 'Imports'. From the CRAN Policies

Re: [R-pkg-devel] Too many processes spawned on Windows and Debian, although only 2 cores should be used

2022-11-16 Thread Henrik Bengtsson
Hello. As already pointed out, the current R implementation treats any non-empty value on _R_CHECK_LIMIT_CORES_ different from "false" as a true value, e.g. "TRUE", "true", "T", "1", but also "donald duck". Using '--as-cran' sets _R_CHECK_LIMIT_CORES_="TRUE", if unset. If already set, it'll not

Re: [R-pkg-devel] Examples with CPU time is greater than elapsed time.

2022-11-05 Thread Henrik Bengtsson
I think it's because it suggests that the package uses more than 250% of CPU load on average, which suggests it runs in parallel with more than two parallel workers, which is the upper limit in the CRAN Policies (https://cran.r-project.org/web/packages/policies.html); "If running a package uses

Re: [R-pkg-devel] NOTE checking for detritus in the temp directory on windows

2022-09-30 Thread Henrik Bengtsson
Hi. > * checking for detritus in the temp directory ... NOTE > Found the following files/directories: > 'Rscript306c1f1adf1' 'Rscript3fb41f1adf1' Whenever seeing detritus files with name Rscript like these, it's a strong suggestion that parallel workers on MS Windows are involved. More

Re: [R-pkg-devel] Help - Shiny app on CRAN

2022-09-28 Thread Henrik Bengtsson
Hi, it's not just you; the win-builder server is down for all of us (e.g. https://downforeveryoneorjustme.com/win-builder.r-project.org?proto=https). Uwe Ligges, who maintains this, mentioned (in another thread somewhere) that there were networking issues at his university that are being worked

Re: [R-pkg-devel] Help - Shiny app on CRAN

2022-09-26 Thread Henrik Bengtsson
Hello, are you aware of https://win-builder.r-project.org/? It'll allow you to validate that your package passes all the requirements before submitting it to CRAN. My $.02 /Henrik On Mon, Sep 26, 2022 at 11:23 AM Jahajeeah, Havisha wrote: > > Dear team, > > My second attempt at submitting the

Re: [R-pkg-devel] Package ‘wflo’ was removed from the CRAN repository.

2022-09-24 Thread Henrik Bengtsson
Hello. It looks like things to have changed since; $ R CMD check --as-cran wflo_1.6.tar.gz * using log directory ‘/tmp/wflo.Rcheck’ * using R version 4.2.1 (2022-06-23) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--as-cran’ * checking for file

Re: [R-pkg-devel] HTML5 errors in win-builder R-release check

2022-05-03 Thread Henrik Bengtsson
Looks like a mistake in R that was fixed in R-devel (rev 82308) less than a day ago, cf. https://github.com/wch/r-source/commit/60cc6ebd762d4199aa8e5addf08282e336138a4a /Henrik On Tue, May 3, 2022 at 10:54 AM J C Nash wrote: > > I've been asked to "fix" some NOTEs in two of my packages. > >

Re: [R-pkg-devel] find functions with missing Rd tags

2021-06-23 Thread Henrik Bengtsson
$ grep -L -F "\value{" man/*.Rd /Henrik On Wed, Jun 23, 2021 at 10:58 AM Alex Chubaty wrote: > > During a recent package submission process, a CRAN maintainer showed one of > their checks found missing \value{} documentation in some package Rd files, > and asked us to ensure all exported

Re: [R-pkg-devel] Old version of rtracklayer on a single check server

2021-05-18 Thread Henrik Bengtsson
in the post has the > wrong version of rtracklayer for R-devel. > > Martin Morgan > > On 5/18/21, 11:49 AM, "R-package-devel on behalf of Henrik Bengtsson" < > r-package-devel-boun...@r-project.org on behalf of > henrik.bengts...@gmail.com> wrote: > >

Re: [R-pkg-devel] Old version of rtracklayer on a single check server

2021-05-18 Thread Henrik Bengtsson
It's a problem with Bioconductor and a broken release history of 'rtracklayer' on MS Windows (e.g. https://bioconductor.org/packages/3.12/bioc/html/rtracklayer.html) plus how each Bioconductor version is tied to a specific R version. In other words, even if they fix it in Bioconductor 3.13 (for R

Re: [R-pkg-devel] Package fails to build on CRAN Windows server: rtracklayer version too new

2021-04-19 Thread Henrik Bengtsson
Not that it solves your problem per se, but here's what I think CRAN only has rtracklayer 1.48.0 installed on WIndows, i.e. why you get error "namespace 'rtracklayer' 1.48.0 is being loaded, but >= 1.51.5 is required.": * The current Bioconductor "release" is version 3.12 * As you say,

Re: [R-pkg-devel] Vignettes from LaTeX files.

2021-03-05 Thread Henrik Bengtsson
getting into literate programming, and we already have several vignette engines for that. Just a thought, Henrik On Thu, Mar 4, 2021 at 7:20 PM Rolf Turner wrote: > > > > I have now tried out building vignettes from plain LaTeX source, > following the admirably lucid instructions pro

Re: [R-pkg-devel] Why .Rbuildignore doesn't ignore?

2021-03-04 Thread Henrik Bengtsson
FYI, and in case others wonder or search for this later, the warnings: Warning: invalid uid value replaced by that for user 'nobody' Warning: invalid gid value replaced by that for user 'nobody' are harmless and has nothing to do with your problem reported here. It happens because on the system

Re: [R-pkg-devel] Using the amsmath package in a vignette.

2021-03-03 Thread Henrik Bengtsson
The R.rsp has a vignette engine for plain LaTeX sources. See https://cran.r-project.org/web/packages/R.rsp/vignettes/R_packages-LaTeX_vignettes.pdf for how. It's straightforward. Maybe that helps. Henrik On Wed, Mar 3, 2021, 18:51 Rolf Turner wrote: > > I am trying to create a vignette in a

Re: [R-pkg-devel] Testing on old R versions

2021-01-28 Thread Henrik Bengtsson
Hi, you're probably already aware of it, but 'rgl' depends on 'magrittr' which depends on 'rlang', and the latter requires R (>= 3.3.0). BTW, I find Singularity (https://github.com/hpcng/singularity/) more convenient to work with than Docker, e.g. you run as host $USER also "inside" the

Re: [R-pkg-devel] Package used unconditionally only in testing

2021-01-08 Thread Henrik Bengtsson
R CMD check --as-cran will give an ERROR if not all Suggest:ed packages are installed and available when it runs. /Henrik On Fri, Jan 8, 2021 at 11:25 AM Greg Freedman Ellis wrote: > > > It should almost certainly be included in Suggests, and nowhere else. > > If that means your tests are

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Henrik Bengtsson
020 at 12:27 PM Henrik Bengtsson wrote: > > Colin, you can do: > > Imports: tools > > NAMESPACE: > if (getRversion() >= 4) importFrom(tools,R_user_dir) > > > R/000.namespace.R: > ## Create a dummy R_user_dir() for R (< 4.0.0) > ## to please R CMD ch

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Henrik Bengtsson
Colin, you can do: Imports: tools NAMESPACE: if (getRversion() >= 4) importFrom(tools,R_user_dir) R/000.namespace.R: ## Create a dummy R_user_dir() for R (< 4.0.0) ## to please R CMD check if (getRversion() < 4) { R_user_dir <- function(...) NULL } and then use: if (getRversion() < 4) {

Re: [R-pkg-devel] Conditional timeout for httr request when running R CMD check

2020-11-30 Thread Henrik Bengtsson
The problem here was regarding user facing example():s, not package tests. In order to keep a neat example for the user to play with, I'd probably wrap the example code in a \donttest{} statement. Though, I don't remember if CRAN tests with R CMD check --run-dontest, or not. There's also

Re: [R-pkg-devel] Error in loadNamespace(x) : there is no package called 'formatR'

2020-11-13 Thread Henrik Bengtsson
I'm quite sure you want to use the following: Suggests: knitr, rmarkdown, formatR VignetteBuilder: knitr Here are the details. For the 'VignetteBuilder' field, you want to put all packages that provide the **vignette engines** you are using. For example, if your package vignettes use either of

Re: [R-pkg-devel] Import package countreg that is not on CRAN

2020-11-13 Thread Henrik Bengtsson
You can change your package from using: Imports: countreg to use: Suggests: countreg For this to work, you'll have to update your code, package tests, examples, and vignettes, to run conditionally on 'countreg' being installed, e.g. if (requireNamespace("countreg", quietly = TRUE)) {

Re: [R-pkg-devel] Delays in CRAN Windows Binaries?

2020-10-21 Thread Henrik Bengtsson
Related to this: It would be neat to have a dashboard that reports on the current latency is on the different CRAN "queues" are, e.g. how long is the average waiting time when submitting a new package ("newbies") until you get a manual reply or it's on CRAN, submitting an update with all OK

Re: [R-pkg-devel] Anyone Know How To Setup Wine for Windows Testing?

2020-09-21 Thread Henrik Bengtsson
Getting R to run well on Wine would be really neat. Here are some additional comments that might encourage someone to move this forward. On Ubuntu 18.04, you can install and run R 3.6.0 on Wine as: curl -O https://cloud.r-project.org/bin/windows/base/old/3.6.0/R-3.6.0-win.exe wine

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Henrik Bengtsson
Without having read all of the comments already made here, but my understanding why ::: is not allowed is because you are reaching into the internal API that the package owner does not guarantee will exist in the next release. If you rely on the internal code of another CRAN package in your CRAN

Re: [R-pkg-devel] Package Anchored Links with R-Dev

2020-08-10 Thread Henrik Bengtsson
These recently introduced 'R CMD check' WARNINGs were disabled again in R-devel on July 8, 2020: r78793: https://github.com/wch/r-source/commit/ccd903e47ab42e1c181396256aea56454a2e70c9 r78794: https://github.com/wch/r-source/commit/b70f90ae11dd516c1c954ed15eb5a7c2a304b37f This is because

Re: [R-pkg-devel] Interpret feedback: not write testthat-tests in examples

2020-07-16 Thread Henrik Bengtsson
If the point of having, say, stopifnot(add(1, 2) == sum(c(1, 2)) is to make it explicit to the reader that your add() function gives the same results as sum(), then I argue that is valid to use in an example. I'm pretty sure I've used that in some of my examples. For the purpose, there should

Re: [R-pkg-devel] How do you Rd reference parallel::mclapply() so it works also on Windows?

2020-07-08 Thread Henrik Bengtsson
Kurt Hornik wrote: ... > But perhaps simply wait for a few more days ... Oh, this is good news. I see that these new warnings have already been disabled in R-devel. Thxs, Henrik On Wed, Jul 8, 2020 at 1:17 AM Kurt Hornik wrote: > > >>>>> Henrik Bengtsson writes: > > &g

[R-pkg-devel] How do you Rd reference parallel::mclapply() so it works also on Windows?

2020-07-07 Thread Henrik Bengtsson
Here's another "Non-file package-anchored link(s) ..." issue. I'd like to reference parallel::mclapply() in my help pages. With the new R-devel requirements, you have to link to the file and not the topic. However, there is no cross-platform stable file reference for parallel::mclapply(); #

Re: [R-pkg-devel] note about mispelled words

2020-03-17 Thread Henrik Bengtsson
You can single quote them to avoid them being spell checked, e.g. ... using methods of 'Kruskall' and 'Brainerd'. This is a common and accepted practice. This is hinted at in "Writing R Extensions" (e.g. help.start()); The mandatory ‘Description’ field should give a comprehensive description of

Re: [R-pkg-devel] Fwd: Re: [CRAN-pretest-archived] CRAN submission SSLR 0.9.0

2020-03-11 Thread Henrik Bengtsson
'fpalomares', it's not clear if you can reproduce this locally or not, but make sure you can reproduce it locally. I could using: R CMD check --as-cran SSLR_0.9.0.tar.gz with R 3.6.3 on Ubuntu 18.04. In other words, this is neither a problem with the CRAN incoming checks nor win-builder. Yes,

Re: [R-pkg-devel] Winbuilder queues jammed again?

2020-03-05 Thread Henrik Bengtsson
1. I'd guess it helps Uwe a bit you clarify exactly which queue you think is stuck - otherwise he has to check them all. They're independent. 2. You can look at the different win-builder queues yourself via ftp, see https://stat.ethz.ch/pipermail/r-package-devel/2020q1/005098.html /Henrik On

Re: [R-pkg-devel] [FORGED] Re: win-builder down?

2020-02-29 Thread Henrik Bengtsson
FYI, in past when queues got stuck, Uwe told me it's often a package that launches an external process (e.g. java.exe) that doesn't terminate and prevents R CMD check from terminating/timing out. He got watchdogs to kill such stray events but there are false negatives. A couple of weeks ago I

Re: [R-pkg-devel] win-builder down?

2020-02-29 Thread Henrik Bengtsson
Could be. FYI, I think the different win-builder queues are independent, i.e. when one get stuck it does not affect the others. For example, I just verified that R-devel_gcc8 works. $ date --iso-8601=seconds 2020-02-29T07:41:53-08:00 $ curl -s ftp://win-builder.r-project.org/R-oldrel/ | sed

Re: [R-pkg-devel] How to provide a finalized PDF file in a package?

2020-01-21 Thread Henrik Bengtsson
gt; > G. > > On Tue, Jan 21, 2020 at 5:30 PM Henrik Bengtsson > wrote: > > > > The R.rsp::asis and R.rsp::tex could easily be pulled out from R.rsp > > in a standalone package with zero dependencies. However, it would be > > better if they could be brought

Re: [R-pkg-devel] How to provide a finalized PDF file in a package?

2020-01-21 Thread Henrik Bengtsson
The R.rsp::asis and R.rsp::tex could easily be pulled out from R.rsp in a standalone package with zero dependencies. However, it would be better if they could be brought into the 'tools' package. This is why I never went down the path or making a standalone package (adding yet another package to

Re: [R-pkg-devel] How to provide a finalized PDF file in a package?

2020-01-21 Thread Henrik Bengtsson
It sounds like you want the PDF to have it appear as a package vignette. You can use the R.rsp::asis vignette engine (https://cran.r-project.org/package=R.rsp) to add static PDFs as vignettes to your package. The PDF is included as-is during the package *build* process (R CMD build) like other

Re: [R-pkg-devel] Large Data Package CRAN Preferences

2019-12-15 Thread Henrik Bengtsson
The R.cache package on CRAN provides can be used for this purpose. It works on all platforms. Per CRAN Policies, it will prompt the user (in an interactive session) whether they wish to use a persistent cache folder, or to fall back to temporary one. For example, > path <-

Re: [R-pkg-devel] Error while checking if Pandoc is available

2019-12-06 Thread Henrik Bengtsson
Hugh is correct. To clarify, update if (!rmarkdown::pandoc_available() || rmarkdown::pandoc_version() < "1.12.3") { stop("'brinton' requires Pandoc v < 1.12.3 (https://pandoc.org/)") } The reason is that when using 'a || b', expression 'b' will NOT be evaluated if 'a' is not TRUE. In

Re: [R-pkg-devel] bioRxiv Preprint as Vignette

2019-11-30 Thread Henrik Bengtsson
Disclaimer, I'm the author: You can include a static PDF using the R.rsp::asis vignette engine: https://cran.r-project.org/web/packages/R.rsp/vignettes/R_packages-Static_PDF_and_HTML_vignettes.pdf Better is if you've got the LaTeX source (with figures etc.), then use the R.rsp::tex vignette

Re: [R-pkg-devel] Why doesn't R CMD check warn that globalVariables() is undefined/not imported?

2019-09-24 Thread Henrik Bengtsson
or > > On Tue, Sep 24, 2019 at 7:08 PM Henrik Bengtsson > wrote: > > > > 'R CMD check' will give a warning that 'speed' is an unknown variable in: > > > > low_speeds <- function(limit) { > > subset(datasets::cars, speed <= limit) > >

[R-pkg-devel] Why doesn't R CMD check warn that globalVariables() is undefined/not imported?

2019-09-24 Thread Henrik Bengtsson
'R CMD check' will give a warning that 'speed' is an unknown variable in: low_speeds <- function(limit) { subset(datasets::cars, speed <= limit) } We can tell 'R CMD check' that 'speed' is a false positive by declaring it a "global" variable. This can be done, by: low_speeds <-

Re: [R-pkg-devel] How reproduce CRAN check

2019-09-13 Thread Henrik Bengtsson
As first step of being able to reproduce the error, have a look at R-Hub (https://blog.r-hub.io/2019/03/26/why-care/). It'll allow you to use their servers to test your package on many different configurations. It helped me several times. You can launch it all from you local R prompt, e.g. >

Re: [R-pkg-devel] "Progress reports" for examples in packages.

2019-07-01 Thread Henrik Bengtsson
FWIW, when running R CMD check mypkg_1.0.tar.gz the example output is captured to the file 'mypkg.Rcheck/mypkg-Ex.Rout', so you could monitor that one for what's going on. /Henrik On Mon, Jul 1, 2019 at 7:00 PM Rolf Turner wrote: > > > I am currently working on a package such that when "R CMD

Re: [R-pkg-devel] try() in R CMD check --as-cran

2019-06-07 Thread Henrik Bengtsson
Duncan and others, see one of Serguei comments above. Specifically, `R CMD check --as-cran` will set _R_CHECK_LENGTH_1_LOGIC2_="package:_R_CHECK_PACKAGE_NAME_,abort,verbose" which will (i) check those coding mistakes only in the package that is checked but not any of its dependencies, (ii) it

Re: [R-pkg-devel] Writing to files without altering working directory in R package

2019-05-07 Thread Henrik Bengtsson
I agree that setwd(), tempdir(), etc. clutter up examples. At the same time, I respect the CRAN policy - it's conservative approach has helped us avoid a wild-west working environment. One approach that might help bring some standardization, instead of each package developer rolls their own, and

Re: [R-pkg-devel] package cartograflow_0.0.0.9000.tar.gz

2019-03-26 Thread Henrik Bengtsson
FWIW, you should be able to reproduce at least the following NOTEs with your current R 3.5.2 and R CMD check --as-cran: * checking CRAN incoming feasibility ... NOTE Maintainer: ‘cartogRaflow ’ New submission Version contains large components (0.0.0.9000) Possibly mis-spelled words in

Re: [R-pkg-devel] CRAN review

2019-03-22 Thread Henrik Bengtsson
ar 2019 at 10:05, Maëlle SALMON via R-package-devel < > > r-package-devel@r-project.org> wrote: > > > > > > > > > > > > > > -- Forwarded message -- > > > From: "Maëlle SALMON" > > > To: Duncan Murdoch , Henrik Bengtsson <

Re: [R-pkg-devel] CRAN review

2019-03-12 Thread Henrik Bengtsson
You can also "follow" your package submission on the CRAN FTP server: ftp://cran.r-project.org/incoming/ /Henrik On Tue, Mar 12, 2019 at 1:26 PM Duncan Murdoch wrote: > > On 12/03/2019 2:57 p.m., Τόλης Χαλκής wrote: > > Dear all, > > > > We have submitted a package to CRAN in 25th of

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Henrik Bengtsson
I take a complementary approach; I condition on, my home-made, R_TEST_ALL variable. Effectively, I do: if (as.logical(Sys.getenv("R_TEST_ALL", "FALSE"))) { ... } and set R_TEST_ALL=TRUE when I want to run that part of the test. You can also imagine refined versions of this, e.g.

Re: [R-pkg-devel] New test in R-devel causes existing packages to fail: "Error: connections left open"

2018-08-23 Thread Henrik Bengtsson
Does R CMD check --as-cran test for newly opened connections or any open connections? Could the check for stray connection in examples/vignettes be: 1. Record what connections are open 2. Attach the package 3. Record what connections are open 4. Run the example 5. Assert that no *new*

Re: [R-pkg-devel] Disable a particular knitr vignette

2018-08-02 Thread Henrik Bengtsson
As a workaround, until resolved, you could precompile your vignette into a PDF and then use the 'R.rsp::asis' vignette engine (%\VignetteEngine{R.rsp::asis} etc) to include it as a static PDF. This is described in the vignettes (https://cran.r-project.org/package=R.rsp). -Henrik On Thu, Aug 2,

Re: [R-pkg-devel] Versioning conventions

2018-07-10 Thread Henrik Bengtsson
On Tue, Jul 10, 2018 at 7:00 AM David Hugh-Jones wrote: > > Hi all, > > Just updated my rcheology package with data on functions for R 3.5.1 (no > change from R 3.5.0 afaik). See https://github.com/hughjonesd/rcheology. > > I'm wondering how to version this package. It's not on CRAN yet so it

Re: [R-pkg-devel] How to write example results to a tempdir()?

2018-04-26 Thread Henrik Bengtsson
examples. > > On Thu, Apr 26, 2018 at 10:04 AM, Henrik Bengtsson > <henrik.bengts...@gmail.com> wrote: >> >> On Thu, Apr 26, 2018 at 6:28 AM, Spencer Graves >> <spencer.gra...@effectivedefense.org> wrote: >> > >> > >> > On 2018-

Re: [R-pkg-devel] How to write example results to a tempdir()?

2018-04-26 Thread Henrik Bengtsson
On Thu, Apr 26, 2018 at 6:28 AM, Spencer Graves wrote: > > > On 2018-04-26 07:11, Jose A Guijarro wrote: >> >> El 25/04/18 a las 20:21, Duncan Murdoch escribió: >>> >>> On 25/04/2018 1:32 PM, Sarah Goslee wrote: Don't change the working directory!

Re: [R-pkg-devel] Saving output of check()

2018-04-11 Thread Henrik Bengtsson
R CMD check, which is used internally runs checks in standalone background R processes. Output from these is not capturable/sinkable by the master R process. The gist of what's happening is: > sink("output.log") > system("echo hello") ## not sinked/captured hello > sink() >

Re: [R-pkg-devel] CRAN stable download url?

2018-03-08 Thread Henrik Bengtsson
On Thu, Mar 8, 2018 at 12:39 PM, Jonathon Love wrote: > hi, > > i'm bundling some R packages to go into a flatpak/flathub application. for > that it is necessary to provide the download URLs for all the required > dependencies in advance - including R packages. this works, *except*

Re: [R-pkg-devel] Fixed for messages

2018-01-08 Thread Henrik Bengtsson
On Mon, Jan 8, 2018 at 7:31 AM, Roy Mendelssohn - NOAA Federal wrote: > Hi All: > > In tesitng a package on winbuild-devel (but not on release) I get the > following errors or warnings: > >> Warning in engine$weave(file, quiet = quiet, encoding = enc) : >> The

Re: [R-pkg-devel] File name error

2017-12-21 Thread Henrik Bengtsson
Uwe/Kurt, is this controlled by R itself or by the host system? I suspect one of my R.filesets tests(*) fails (since a few days) because of this, but it might actually be a false positive. I fail to reproduce it on Ubuntu 16.04 with: * using R Under development (unstable) (2017-12-20 r73933) *

Re: [R-pkg-devel] Testing for a Specific R Error

2017-12-02 Thread Henrik Bengtsson
For the translation part, you can test the received error message against the translated message. You can get the translated version from the original one using gettext(""). This should be agile to user's language settings but, of course, not to changes that the developer does to the the error

Re: [R-pkg-devel] CRAN Package error

2017-11-30 Thread Henrik Bengtsson
>> On 30.11.2017 12:52, Andrew Holding wrote: >> [...] I know the new Bioconductor on devel is unstable [...] Does CRAN support packages in the Bioconductor *devel* repository? /Henrik On Thu, Nov 30, 2017 at 2:54 PM, Andrew Holding wrote: > Dear Uwe, > > Just submitted the

Re: [R-pkg-devel] CRAN submission never published

2017-09-10 Thread Henrik Bengtsson
Looks like a hiccup to me - this never happened to me. I suggest sending cran@... an email about this. /Henrik On Sun, Sep 10, 2017 at 4:02 AM, Jacob Long wrote: > I noticed my package, jtools ( > https://cran.r-project.org/web/packages/jtools/index.html), didn’t > increment

Re: [R-pkg-devel] new package submission: "check log incomplete, web timeout?"

2017-04-23 Thread Henrik Bengtsson
Your package uses parallel processing (foreach w/ doParallel). Peeking at the code, it looks like the vignette is using single-core processing via doParallel::registerDoParallel(np) where np = 1. On Unix-like system, this *forks* off a single R process, and on Windows it *launches* a single

Re: [R-pkg-devel] .bib file in vignette not found during R CMD check

2017-02-28 Thread Henrik Bengtsson
On Tue, Feb 28, 2017 at 2:47 PM, Duncan Murdoch wrote: > On 28/02/2017 5:17 PM, Patrick Schratz wrote: >> >> Thanks Duncan, that was the problem! Although the Rbuildignore entry >> pointed to the main dir > > > No, it contains patterns, not paths, and is matched

Re: [R-pkg-devel] R CMD Check: Tests running infinite

2017-02-07 Thread Henrik Bengtsson
r tests, which is on top of the foreach package. I don't use testthat and I also don't use doParallel in my testing. /Henrik > > Gabor > > On Mon, Feb 6, 2017 at 2:17 AM, Henrik Bengtsson > <henrik.bengts...@gmail.com> wrote: >> >> In case someone else bumps into

Re: [R-pkg-devel] R CMD Check: Tests running infinite

2017-02-05 Thread Henrik Bengtsson
;> I tried to use all cluster closing functions I came across but tests are >> still running infinite.. >> >> cl <- makeCluster(par.args$par.units, outfile = out.progress) >> registerDoParallel(cl) >> >> foreach() >> >> parallel::stopCluster(cl)

Re: [R-pkg-devel] Relicense to GPL-3?

2016-11-06 Thread Henrik Bengtsson
What's already been said is good advice. At first, it may be a bit tricky to under copyright and licenses. When I started out, I for the longest held back on releasing software / packages because I somehow thought I basically had to make a final decision on the license at that moment and that

Re: [R-pkg-devel] R Packages Never Finish Check

2016-10-02 Thread Henrik Bengtsson
I think R CMD check calls res <- system2("du", "-k", TRUE, TRUE) also on Windows, cf. https://github.com/wch/r-source/blob/trunk/src/library/tools/R/check.R#L3859 It could be that you have a corrupt / different `du` tool on your PATH. As a first thing, try calling the above from within you

Re: [R-pkg-devel] Is S3 class registration essential for CRAN?

2016-07-13 Thread Henrik Bengtsson
I second Dirk. Also, from my experience: A good rule of thumb is that you should fix all NOTEs (i.e. not have them) when you submit to CRAN. It's only when you have a really good reason you could try to convince CRAN that they are there and that they cannot be fixed easily. I've got 20+

Re: [R-pkg-devel] Getting a package ready for CRAN - some questions

2016-06-01 Thread Henrik Bengtsson
If it's not feasible to create a fast vignette or to avoid downloading files, an alternative is to pre-generate the vignette and include it as a static PDF/HTML vignette, cf. https://cran.r-project.org/package=R.rsp. If it's a LaTeX-based vignette (e.g. Sweave/knitr), you could pre-generate the

Re: [R-pkg-devel] What's recommended to do on "Suggests or Enhances not in mainstream repositories: ..."?

2016-05-21 Thread Henrik Bengtsson
On Sat, May 21, 2016 at 8:22 AM, Marius Hofert wrote: > Hi, > > I have (co-)developed two packages: 'qrmtools' and 'qrmdata'. The > latter contains data sets and is currently only available on R-Forge > (as it is larger than 5MB and thus not accepted for CRAN [although

Re: [R-pkg-devel] Has GitHub been used as a CRAN-style repository?

2016-04-27 Thread Henrik Bengtsson
On Wed, Apr 27, 2016 at 12:40 PM, Ramon Diaz-Uriarte wrote: > Dear Bruce, > > > On Wed, 27-04-2016, at 19:00, Bruce Hoff wrote: >> Following up to my earlier post: It looks like Dirk Eddelbuettel has in >> fact built what I was asking for with 'drat',

Re: [R-pkg-devel] Format/parser for NEWS (not NEWS.Rd)?

2015-10-13 Thread Henrik Bengtsson
iously and put the NEWS file in a separate "sandbox" directory, then you get: > tools:::news2Rd("NEWS", out="NEWS.Rd") Error: 'readNEWS' is defunct. See help("Defunct") With the a very recent R-devel, you now get: > tools:::news2Rd("NEWS", "NEW

[R-pkg-devel] Format/parser for NEWS (not NEWS.Rd)?

2015-10-07 Thread Henrik Bengtsson
Hi, I'm looking for a parser of the plain text NEWS format (not the NEWS.Rd format) - ideally the same on that is used by R itself. Does anyone know which that one is / of such at tool? Thanks, Henrik PS. help("news") mentions tools:::news2Rd(), but that's actually defunct (just reported

Re: [R-pkg-devel] Best practices for vignettes

2015-07-27 Thread Henrik Bengtsson
Have a look at tools::buildVignette() - it builds a vignette the same way as R CMD build does it. It's a good start for troubleshooting. /Henrik On Mon, Jul 27, 2015 at 1:31 AM, Lenth, Russell V russell-le...@uiowa.edu wrote: Thanks, Dirk. Well, I tried this (after suitable modification), and

Re: [R-pkg-devel] R-devel problem with temporary files or decompression?

2015-07-12 Thread Henrik Bengtsson
I don't see any particular wrong with your code, so it seems like R.utils doesn't handle your 'file' / 'tmp' pathnames correctly. However, I cannot reproduce this (know what 'file' and 'tmp' are would help), so I cannot fix it either. Either way, instead of using low-level decompressFile(), you