Re: [Rd] Typo in Renviron.site in R 4.2.0 on Ubuntu?

2022-05-08 Thread Henrik Bengtsson
> ... The extra apostrophe does not seem to have created an issue during all > those tests, or since, under either Debian or Ubuntu. I think that is because the system library '/usr/lib/R/library' is always appended at the end of the library path, so that non-existing to folder (the one with the

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. > >

[Rd] MS Windows: R does not escape quotes in CLI options the same way as Rterm and Rscript

2021-12-15 Thread Henrik Bengtsson
On MS Windows 10, the following works: > Rscript --vanilla -e "\"abc\"" [1] "abc" and also: > Rterm --vanilla --no-echo -e "\"abc.txt\"" [1] "abc.txt" whereas attempting the same with 'R' fails; > R --vanilla --no-echo -e "\"abc.txt\"" Error: object 'abc' not found Execution halted I get

Re: [Rd] capturing multiple warnings in tryCatch()

2021-12-02 Thread Henrik Bengtsson
Simon's suggestion with withCallingHandlers() is the correct way. Also, note that if you use tryCatch() to catch warnings, you're *interrupting* the evaluation of the expression of interest, e.g. > res <- tryCatch({ message("hey"); warning("boom"); message("there"); 42 }, > warning = function(w)

[Rd] R-devel: as.vector(x, mode = "list") drops attributes despite documented not to

2021-12-01 Thread Henrik Bengtsson
Hi, in R 4.1.2 we have: > x <- structure(as.list(1:2), dim = c(1,2)) > x [,1] [,2] [1,] 12 > as.vector(x, mode = "list") [,1] [,2] [1,] 12 whereas in recent versions of R-devel (4.2.0) we have: > x <- structure(as.list(1:2), dim = c(1,2)) > x [,1] [,2] [1,] 12 >

[Rd] mapply(): Special case of USE.NAMES=TRUE with recent R-devel updates

2021-11-30 Thread Henrik Bengtsson
Hi, in R-devel (4.2.0), we now get: > mapply(paste, "A", character(), USE.NAMES = TRUE) named list() Now, in ?mapply we have: USE.NAMES: logical; use the names of the first ... argument, or if that is an unnamed character vector, use that vector as the names. This basically says we should

Re: [Bioc-devel] Use set.seed inside function

2021-11-29 Thread Henrik Bengtsson
The easiest is to use withr::with_seed(), e.g. > withr::with_seed(seed = 42L, randomcoloR::distinctColorPalette(6)) [1] "#A0E1BC" "#B8E363" "#D686BE" "#DEA97F" "#B15CD8" "#A2B9D5" > withr::with_seed(seed = 42L, randomcoloR::distinctColorPalette(6)) [1] "#A0E1BC" "#B8E363" "#D686BE" "#DEA97F"

Re: [Rd] How can a package be aware of whether it's on CRAN

2021-11-23 Thread Henrik Bengtsson
On Tue, Nov 23, 2021 at 12:06 PM Gábor Csárdi wrote: > > On Tue, Nov 23, 2021 at 8:49 PM Henrik Bengtsson > wrote: > > > > > Is there any reliable way to let packages to know if they are on CRAN, so > > > they can set omp cores to 2 by default? > &

Re: [Rd] How can a package be aware of whether it's on CRAN

2021-11-23 Thread Henrik Bengtsson
> Is there any reliable way to let packages to know if they are on CRAN, so > they can set omp cores to 2 by default? Instead of testing for "on CRAN" or not, you can test for 'R CMD check' running or not. 'R CMD check' sets environment variable _R_CHECK_LIMIT_CORES_=TRUE. You can use that to

[Rd] DOCS: Exactly when, in the signaling process, is option 'warn' applied?

2021-11-18 Thread Henrik Bengtsson
Hi, the following question sprung out of a package settings option warn=-1 to silence warnings, but those warnings were still caught by withCallingHandlers(..., warning), which the package author did not anticipate. The package has been updated to use suppressWarnings() instead, but as I see a

[Rd] gettext(msgid, domain="R") doesn't work for some 'msgid':s

2021-11-05 Thread Henrik Bengtsson
I'm trying to reuse some of the translations available in base R by using: gettext(msgid, domain="R") This works great for most 'msgid's, e.g. $ LANGUAGE=de Rscript -e 'gettext("cannot get working directory", domain="R")' [1] "kann das Arbeitsverzeichnis nicht ermitteln" However, it does not

Re: [Rd] BUG?: R CMD check with --as-cran *disables* checks for unused imports otherwise performed

2021-11-02 Thread Henrik Bengtsson
the time (May 2020). See "Dependencies NOTE lost with > --as-cran" (https://stat.ethz.ch/pipermail/r-package-devel/2020q2/005467.html) > > On Wed, Oct 20, 2021 at 11:55 PM Henrik Bengtsson > wrote: >> >> ISSUE: >> >> Using 'R CMD check' with --as-cr

Re: [Rd] Fwd: Using existing envars in Renviron on friendly Windows

2021-11-02 Thread Henrik Bengtsson
ER=[${R_LIBS_USER}]" R_LIBS_USER=[C:\Users\foobar\AppData\Roaming\R-library] /Henrik On Sun, Oct 31, 2021 at 2:59 AM Tomas Kalibera wrote: > > > On 10/31/21 2:55 AM, Henrik Bengtsson wrote: > >> ... If one still needed backslashes, > >> they could then be entered

Re: [Rd] Fwd: Using existing envars in Renviron on friendly Windows

2021-10-30 Thread Henrik Bengtsson
> ... If one still needed backslashes, > they could then be entered in single quotes, e.g. VAR='c:\users'. I don't think it matters whether you use single or double quotes - both will work. Here's a proof of concept on Linux with R 4.1.1: $ cat ./.Renviron A=C:\users B='C:\users' C="C:\users"

Re: [Bioc-devel] Package name

2021-10-22 Thread Henrik Bengtsson
For CRAN packages it's easy. Packages on CRAN are eternal. They may be archived, but they are never removed, so in a sense they're always "currently on CRAN". Archived packages may still be installed, but only with some efforts of the user. Some packages go in an out of "archived" status depending

Re: [Rd] Fwd: Using existing envars in Renviron on friendly Windows

2021-10-20 Thread Henrik Bengtsson
Two comments/suggestions: 1. What about recommending to always quote the value in Renviron files, e.g. ABC="Hello world" and DEF="${APPDATA}/R-library"? This should a practice that works on all platforms. 2. What about having readRenviron() escapes strings it imports via environment variables?

[Rd] BUG?: R CMD check with --as-cran *disables* checks for unused imports otherwise performed

2021-10-20 Thread Henrik Bengtsson
ISSUE: Using 'R CMD check' with --as-cran, set_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_=TRUE, whereas the default is FALSE, which you get if you don't add --as-cran. I would expect --as-cran to check more things and more be conservative than without. So, is this behavior a mistake? Could it

Re: [Bioc-devel] Too many dependencies / MultiAssayExperiment + rtracklayer

2021-10-19 Thread Henrik Bengtsson
If you're willing to depend on R (>= 4.0.0), then tools::R_user_dir() can replace the 'rappdirs' package. /Henrik On Mon, Oct 18, 2021, 09:05 Shraddha Pai wrote: > Hi all, > Despite moving rarely-used packages to Suggests and eliminating some (e.g. > TCGAutils), the number of dependencies is

Re: [Bioc-devel] Strange "internal logical NA value has been modified" error

2021-10-12 Thread Henrik Bengtsson
In addition to checking with Valgrind, the ASan/UBsan and rchk platforms on R-Hub (https://builder.r-hub.io/) can probably also be useful; > rhub::check(platform = "linux-x86_64-rocker-gcc-san") > rhub::check(platform = "ubuntu-rchk") /Henrik On Tue, Oct 12, 2021 at 4:54 PM Martin Morgan

Re: [Rd] R-devel: as.character() for hexmode no longer pads with zeros

2021-09-23 Thread Henrik Bengtsson
if this is a property we should all strive for for other types of objects? /Henrik On Thu, Sep 23, 2021 at 12:46 AM Martin Maechler wrote: > > >>>>> Henrik Bengtsson > >>>>> on Wed, 22 Sep 2021 20:48:05 -0700 writes: > > > The update in rev 80946 &g

[Rd] R-devel: as.character() for hexmode no longer pads with zeros

2021-09-22 Thread Henrik Bengtsson
The update in rev 80946 (https://github.com/wch/r-source/commit/d970867722e14811e8ba6b0ba8e0f478ff482f5e) caused as.character() on hexmode objects to no longer pads with zeros. Before: > x <- structure(as.integer(c(0,8,16,24,32)), class="hexmode") > x [1] "00" "08" "10" "18" "20" >

Re: [Rd] WISH: set.seed(seed) to produce error if length(seed) != 1 (now silent)

2021-09-17 Thread Henrik Bengtsson
gt; > runif(1) > [1] 0.3842704 > > > sum(.Random.seed) > [1] -13435151647 > > # So let's make things really random, by using the new seed as a seed: > > set.seed(.Random.seed) > > sum(.Random.seed) > [1] 24428993419 > > # Back to the original! > >

Re: [Rd] WISH: set.seed(seed) to produce error if length(seed) != 1 (now silent)

2021-09-17 Thread Henrik Bengtsson
warning or error with set.seed(). > > Validating inputs and emitting errors early is a good practice. > > Just my 2 cents. > > Sincerely. > Andre GILLIBERT > > -Message d'origine- > De : R-devel [mailto:r-devel-boun...@r-project.org] De la part de Avraham > Adler &

[Rd] WISH: set.seed(seed) to produce error if length(seed) != 1 (now silent)

2021-09-17 Thread Henrik Bengtsson
Hi, according to help("set.seed"), argument 'seed' to set.seed() should be: a single value, interpreted as an integer, or NULL (see ‘Details’). >From code inspection (src/main/RNG.c) and testing, it turns out that if you pass a 'seed' with length greater than one, it silently uses seed[1],

Re: [Bioc-devel] git: lost write access to some repos + what is my BiocCredentials email address?

2021-08-19 Thread Henrik Bengtsson
> Dana Farber Cancer Institute > > > On Aug 19, 2021, at 8:08 AM, Henrik Bengtsson > > wrote: > > > > Hi, > > > > I seem to have "lost" write access to several Bioconductor git > > repositories that I had git push access for before; > &g

[Bioc-devel] git: lost write access to some repos + what is my BiocCredentials email address?

2021-08-19 Thread Henrik Bengtsson
Hi, I seem to have "lost" write access to several Bioconductor git repositories that I had git push access for before; $ ssh -T g...@git.bioconductor.org | grep -E "(affxparser|aroma.light|illuminaio|QDNAseq)$" X11 forwarding request failed on channel 0 R packages/QDNAseq R

Re: [Rd] Force quitting a FORK cluster node on macOS and Solaris wreaks havoc

2021-08-16 Thread Henrik Bengtsson
Thank you Simon, this is helpful. I take this is specific to quit(), so it's a poor choice for emulating crashed parallel workers, and Sys.kill() is much better for that. I was focusing on that odd extra execution/output, but as you say, there are lots of other things that is done by quit()

[Rd] Force quitting a FORK cluster node on macOS and Solaris wreaks havoc

2021-08-12 Thread Henrik Bengtsson
The following smells like a bug in R to me, because it puts the main R session into an unstable state. Consider the following R script: a <- 42 message("a=", a) cl <- parallel::makeCluster(1L, type="FORK") try(parallel::clusterEvalQ(cl, quit(save="no"))) message("parallel:::isChild()=",

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: [Bioc-devel] Build error "failure: length > 1 in coercion to logical" not reproducible

2021-06-17 Thread Henrik Bengtsson
On Thu, Jun 17, 2021 at 2:32 AM wrote: > > Dear colleagues, > > It seems to me that, starting with the latest BioC devel branch (3.14), the > build systems have become more pedantic about logical vectors of length > 1 > in conditions. Two of the packages I am maintaining, 'kebabs' and 'procoil' >

[Rd] R for Windows leaves detritus in the temp directory

2021-06-15 Thread Henrik Bengtsson
ISSUE: The TMPDIR validation done in src/gnuwin32/system.c: /* in case getpid() is not unique -- has been seen under Windows */ snprintf(ifile, 1024, "%s/Rscript%x%x", tm, getpid(), (unsigned int) GetTickCount()); ifp = fopen(ifile, "w+b"); if(!ifp) R_Suicide(_("creation

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: [Rd] Testing R build when using --without-recommended-packages?

2021-05-05 Thread Henrik Bengtsson
On Wed, May 5, 2021 at 2:13 AM Martin Maechler wrote: > > > Gabriel Becker > > on Tue, 4 May 2021 14:40:22 -0700 writes: > > > Hmm, that's fair enough Ben, I stand corrected. I will say that this > seems > > to be a pretty "soft" recommendation, as these things go, given

Re: [Rd] Testing R build when using --without-recommended-packages?

2021-05-04 Thread Henrik Bengtsson
;Failed with error: 'there is no package called 'nlme'". (*) BTW, '../bin/R CMD make test-BasePackages' gives "make: *** No rule to make target 'test-BasePackages'. Stop." Thanks, /Henrik On Tue, May 4, 2021 at 12:22 PM Dirk Eddelbuettel wrote: > > > On 4 May 2021

Re: [Rd] Testing R build when using --without-recommended-packages?

2021-05-04 Thread Henrik Bengtsson
FWIW, $ ./configure --help ... --with-recommended-packages use/install recommended R packages [yes] /Henrik On Tue, May 4, 2021 at 11:17 AM Dirk Eddelbuettel wrote: > > > On 4 May 2021 at 11:07, Henrik Bengtsson wrote: > | Thanks, but I don't understand.

Re: [Rd] Testing R build when using --without-recommended-packages?

2021-05-04 Thread Henrik Bengtsson
for a way to validate such an installation. If your comment is on the 'stats' examples' hard dependency on 'MASS' despite it's being a suggested packages, I still don't follow. /Henrik On Tue, May 4, 2021 at 10:16 AM Dirk Eddelbuettel wrote: > > > On 4 May 2021 at 09:31, Henrik Bengts

[Rd] Testing R build when using --without-recommended-packages?

2021-05-04 Thread Henrik Bengtsson
I'm on Linux (Ubuntu 18.04). How do I check an R build when using --without-recommended-packages? 'make check' assumes 'recommended' packages are installed, so that fails without them available. DETAILS: When I build R from source without 'recommended' packages: curl -O

Re: [Rd] R compilation on old(ish) CentOS

2021-04-30 Thread Henrik Bengtsson
Ben, it's most like what Peter says. I can confirm it works; I just installed https://cran.r-project.org/src/base-prerelease/R-latest.tar.gz on an up-to-date CentOS 7.9.2009 system using the vanilla gcc (GCC) 4.8.5 that comes with that version and R compiles just fine and it passes 'make check'

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,

[Rd] help(".libPaths"): Paragraph lacks mentioning of R_LIBS_SITE

2021-04-19 Thread Henrik Bengtsson
In ?base::.libPaths, there's a paragraph saying: The library search path is initialized at startup from the environment variable R_LIBS (which should be a colon-separated list of directories at which R library trees are rooted) followed by those in environment variable R_LIBS_USER. Only

Re: [Bioc-devel] BiocCheck and version requirement

2021-04-08 Thread Henrik Bengtsson
that is different from the check asking for a specific version for no > particular reason (as far as I can ascertain). > > Best, > Kasper > > On Thu, Apr 8, 2021 at 8:13 PM Henrik Bengtsson > wrote: >> >> > I believe in the past we tried suggesting removing a R d

Re: [Bioc-devel] BiocCheck and version requirement

2021-04-08 Thread Henrik Bengtsson
> I believe in the past we tried suggesting removing a R dependency altogether > but that R CMD check complained not having an R dependency? Maybe someone > remembers more about this. There are no such requirements in 'R CMD check'. The only requirement around 'Depends: R (>= x.y.z)', if

Re: [Bioc-devel] Suppressing messages from Rprofile

2021-04-07 Thread Henrik Bengtsson
Correcting: the env var is R_LIBS_USER and nothing else. /Henrik On Wed, Apr 7, 2021 at 1:20 PM Henrik Bengtsson wrote: > > Can you go via a temporary file instead, i.e. output what you want to > grab to a temporary file and pull the info from that instead? > > Side tracking ...

Re: [Bioc-devel] Suppressing messages from Rprofile

2021-04-07 Thread Henrik Bengtsson
Can you go via a temporary file instead, i.e. output what you want to grab to a temporary file and pull the info from that instead? Side tracking ... > I thought about using --vanilla but I use .Rprofile to set my library path, > so ignoring that file completely defeats the point in my setup.

Re: [Bioc-devel] Updates to BiocFileCache, AnnotationHub, and ExperimentHub

2021-04-07 Thread Henrik Bengtsson
FWIW, I ran into a similar problem when I moved R.cache (https://cran.r-project.org/package=R.cache) from using ~/.Rcache to ~/.cache/R/R.cache (etc). I decided on making it 100%-backward compatible, i.e. if there's already a legacy ~/.Rcache cache folder, it'll keep using that, otherwise the new

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: [Bioc-devel] Remotes in DESCRIPTION not supported for BioC?

2021-03-02 Thread Henrik Bengtsson
Related: Does Bioconductor support 'Additional_repositories'? From RWE: The ‘Additional_repositories’ field is a comma-separated list of repository URLs where the packages named in the other fields may be found. It is currently used by R CMD check to check that the packages can be found, at least

Re: [Bioc-devel] Rsync to Bioconductor

2021-02-25 Thread Henrik Bengtsson
FYI, I just sent an email to 'maintai...@bioconductor.org' regarding this but it bounced with the below errors (I've truncated your address): From: Mail Delivery System Date: Thu, Feb 25, 2021 at 12:39 PM Subject: Undelivered Mail Returned to Sender To: ... This is the mail system at host

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: [Rd] return (x+1) * 1000

2020-11-20 Thread Henrik Bengtsson
Without having dug into the details, it could be that one could update the parser by making a 'return' a keyword and require it to be followed by a parenthesis that optionally contains an expression followed by end of statement (newline or semicolon). Such a "promotion" of the 'return' statement

Re: [Rd] return (x+1) * 1000

2020-11-20 Thread Henrik Bengtsson
FWIW, 'R CMD check --as-cran' in R-devel checks for "bogus return" statements but I think that's only for the case when one forgets the parentheses, e.g. 'return' instead of 'return()'. I don't think it catches this case but I'm also not sure. Though, I can imagine it might be possible to enhance

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: [Rd] Process to Incorporate Functions from {parallely} into base R's {parallel} package

2020-11-07 Thread Henrik Bengtsson
us. Reverse SSH tunneling is super simply; all you need to to is something like: rshopts <- c(sprintf("-R %d:%s:%d", rscript_port, master, port), rshopts) /Henrik On Fri, Nov 6, 2020 at 4:37 PM Duncan Murdoch wrote: > > On 06/11/2020 4:47 p.m., Balamuta, James Joseph wrote: >

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: [Bioc-devel] Git pack file greater than 5MB

2020-10-01 Thread Henrik Bengtsson
onductor git > repository. > > Nitesh > > On Oct 1, 2020, at 11:57 AM, Henrik Bengtsson > wrote: > > Doesn't a git rewrite break all existing clones, forks out there? I'm > happy to be corrected, if this is not the case. > > /Henrik > > On Thu, Oct 1, 2020, 08:16

Re: [Bioc-devel] Git pack file greater than 5MB

2020-10-01 Thread Henrik Bengtsson
Doesn't a git rewrite break all existing clones, forks out there? I'm happy to be corrected, if this is not the case. /Henrik On Thu, Oct 1, 2020, 08:16 Nitesh Turaga wrote: > Hi, > > The BiocCheck will complain on the build system about the > 5MB package > size. > > The rewrite of the history

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: [Rd] Rgui never processes ~/.Renviron

2020-09-09 Thread Henrik Bengtsson
I've "moved" this to https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17919 to make sure it's tracked. /Henrik On Thu, Sep 3, 2020 at 7:25 AM Dirk Eddelbuettel wrote: > > > On 2 September 2020 at 23:38, Henrik Bengtsson wrote: > | WORKAROUND: > | Setting R_USER or H

[Rd] Rgui never processes ~/.Renviron

2020-09-03 Thread Henrik Bengtsson
ISSUE: It looks like Rgui.exe never processes ~/.Renviron - only ./.Renviron. REPRODUCIBLE EXAMPLE: On Windows, create the following ~/.Renviron and ~/.Rprofile files: C:\Users\alice> Rscript -e "cat('FOO=123\n', file='~/.Renviron')" C:\Users\alice> Rscript -e "cat('print(Sys.getenv(\'FOO\'))',

[Rd] Bug in stats:::`[.formula`: (~ NULL)[2] gives Error ... missing value where TRUE/FALSE needed

2020-08-14 Thread Henrik Bengtsson
Hi, it looks like: > stats:::`[.formula` function (x, i) { ans <- NextMethod("[") if (length(ans) == 0L || as.character(ans[[1L]])[1L] == "~") { class(ans) <- "formula" environment(ans) <- environment(x) } ans } doesn't like to extract NULL components on either

Re: [Bioc-devel] sapply and vapply

2020-08-12 Thread Henrik Bengtsson
FWIW, > sapply(X, length) - always numeric(1) (integer(1) or double(1) for vectors of > more than 2^31 - 1 elements) Actually, the length of length(x) may not be 1L, e.g. > x <- Formula::Formula(~ x) > length(x) [1] 0 1 >From help("length", package = "base"): "Warning: Package authors have

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: [Bioc-devel] Possible problems with BiocParallel and R cmd check on Github

2020-07-30 Thread Henrik Bengtsson
action reports? We would like to submit the package for moderation soon > but we're unsure if we can due to this problem. Thank you. > > Il 29/07/2020 19:25, Henrik Bengtsson ha scritto: > > From a very quick look at this, I think you also need to explicitly > > install the p

Re: [Bioc-devel] Possible problems with BiocParallel and R cmd check on Github

2020-07-29 Thread Henrik Bengtsson
>From a very quick look at this, I think you also need to explicitly install the package itself for it to be available in external R session (contrary to when using forked processing as on Linux and macOS). Something like this: - name: Install dependencies run: |

Re: [Rd] Restrict package to load-only access - prevent attempts to attach it

2020-07-17 Thread Henrik Bengtsson
gt; Hi Henrik, > > A bit late, but you can take a look at smbache's {import} package [1] > in case you didn't know it. I believe it does what you are describing. > > [1] https://github.com/smbache/import > > Iñaki > > On Tue, 23 Jun 2020 at 22:21, Henrik Bengtsson > wrote

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(); #

[Rd] Restrict package to load-only access - prevent attempts to attach it

2020-06-23 Thread Henrik Bengtsson
Hi, I'm developing a package whose API is only meant to be used in other packages via imports or pkg::foo(). There should be no need to attach this package so that its API appears on the search() path. As a maintainer, I want to avoid having it appear in search() conflicts by mistake. This

Re: [Rd] r-project.org SSL certificate issues

2020-06-09 Thread Henrik Bengtsson
Was this resolved upstream or is this something that R should/could fix? If the latter, could this also go into the "emergency release" R 4.0.2 that is scheduled for 2020-06-22? My $.02 /Henrik On Sun, May 31, 2020 at 8:13 AM Gábor Csárdi wrote: > > Btw. it would be also possible to create a

Re: [Bioc-devel] How I hide non-exported function from the manual

2020-06-04 Thread Henrik Bengtsson
On Wed, Jun 3, 2020 at 10:40 PM Vincent Carey wrote: > > On Wed, Jun 3, 2020 at 11:48 PM stefano wrote: > > > Hello Community, > > > > I am used to document function although hey are not exported > > > > > I suppose you are talking about tidybulk? I am somewhat mystified by the > behavior > of

Re: [Bioc-devel] Reducing dependencies

2020-06-02 Thread Henrik Bengtsson
RStudio provides pre-built R package for Linux and since a some weeks now, they can be used on GitHub Actions (https://github.com/r-lib/actions). In addition, the run-time limit on GitHub Actions is several hours compared to the 50 minutes you've' got on Travis, so even if you install from

Re: [Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Henrik Bengtsson
Interesting problem. I'm very rusty on S4 but would one solution be to, already now, add 'simplify = TRUE' to the S4 method and document it; setMethod("apply", signature(X = "Speclib"), function(X, FUN, bySI = NULL, ...,

Re: [Rd] Precision of function mean,bug?

2020-05-20 Thread Henrik Bengtsson
On Wed, May 20, 2020 at 11:10 AM brodie gaslam via R-devel wrote: > > > On Wednesday, May 20, 2020, 7:00:09 AM EDT, peter dalgaard > wrote: > > > > Expected, see FAQ 7.31. > > > > You just can't trust == on FP operations. Notice also > > Additionally, since you're implementing a "mean"

Re: [Rd] defining r audio connections

2020-05-06 Thread Henrik Bengtsson
What's the gist of the problem of making/having this part of the public API? Is it security, is it stability, is it that the current API is under construction, is it a worry about maintenance load for R Core, ...? Do we know why? It sounds like it's a feature that is useful. I think we missed

Re: [Rd] mclapply returns NULLs on MacOS when running GAM

2020-04-28 Thread Henrik Bengtsson
>> include it my initial email. It sounds like an RStudio issue, and it seems > >> like that it’s quite intrinsic to how forks interact with RStudio. Given > >> this code is eventually going to be a part of a package, should I expect > >> it to

Re: [Rd] mclapply returns NULLs on MacOS when running GAM

2020-04-28 Thread Henrik Bengtsson
Hi, a few comments below. First, from my experience and troubleshooting similar reports from others, a returned NULL from parallel::mclapply() is often because the corresponding child process crashed/died. However, when this happens you should see a warning, e.g. > y <- parallel::mclapply(1:2,

Re: [Rd] suggestion: "." in [lsv]apply()

2020-04-16 Thread Henrik Bengtsson
I'm sure this exists elsewhere, but, as a trade-off, could you achieve what you want with a separate helper function F(expr) that constructs the function you want to pass to [lsv]apply()? Something that would allow you to write: sapply(split(mtcars, mtcars$cyl), F(summary(lm(mpg ~

Re: [Rd] Add a new environment variable switch for the 'large version' check

2020-04-16 Thread Henrik Bengtsson
I'd second Jim's feature request - it would be useful to be able to disable this in CI and elsewhere.The concept of using an "unusual" version component such as a very large number does a nice job of indicating "unusual" and serves as a blocker for submitting work-in-progress to CRAN by

Re: [Rd] stringsAsFactors

2020-04-13 Thread Henrik Bengtsson
While at it, would it be worth mentioning in the NEWS for R 4.0.0 that options 'stringsAsFactors' is being deprecated, e.g. $ options(stringsAsFactors = TRUE) Warning message: In options(stringsAsFactors = TRUE) : 'options(stringsAsFactors = TRUE)' is deprecated and will be disabled ?

Re: [Rd] WISH: Sys.setlocale() to return value invisibly

2020-03-25 Thread Henrik Bengtsson
sion. https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15128#c1 /Henrik On Tue, Mar 20, 2018 at 2:11 PM Henrik Bengtsson wrote: > > Contrary to, say, Sys.setenv(), Sys.setlocale() returns it's value > visibly. This means that if you for instance add: > > Sys.setlocale(&qu

Re: [Rd] R CMD check --as-cran attempts to hide R_LIBS_USER but fails

2020-03-24 Thread Henrik Bengtsson
n Windows (see, there's some advantages to be on that OS). /Henrik On Wed, Mar 18, 2020 at 9:38 PM Henrik Bengtsson wrote: > > On Wed, Mar 18, 2020 at 8:04 PM Dirk Eddelbuettel wrote: > > > > > > On 18 March 2020 at 19:19, Henrik Bengtsson wrote: > > | AFAIU, 'R

Re: [Rd] R CMD check --as-cran attempts to hide R_LIBS_USER but fails

2020-03-18 Thread Henrik Bengtsson
On Wed, Mar 18, 2020 at 8:04 PM Dirk Eddelbuettel wrote: > > > On 18 March 2020 at 19:19, Henrik Bengtsson wrote: > | AFAIU, 'R CMD check --as-cran' tries to hide any site and user package > | libraries by setting R_LIBS_SITE and R_LIBS_USER. However, contrary > >

[Rd] R CMD check --as-cran attempts to hide R_LIBS_USER but fails

2020-03-18 Thread Henrik Bengtsson
AFAIU, 'R CMD check --as-cran' tries to hide any site and user package libraries by setting R_LIBS_SITE and R_LIBS_USER. However, contrary to R_LIBS_SITE, it fails for R_LIBS_USER and the user's personal library is still available for test scripts. Should I revise my assumptions, or is that

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: [Bioc-devel] proper way to define an S4 method for 'plot'

2020-03-16 Thread Henrik Bengtsson
Maybe it's related to: * The plot() S3 generic function is now in package base rather than package graphics, as it is reasonable to have methods that do not use the graphics package. The generic is currently re-exported from the graphics namespace to allow packages importing it from there to

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: [Rd] tcl problem with R-3.6.3?

2020-02-29 Thread Henrik Bengtsson
Here's a simpler example that should reproduce that error for you: ans <- utils::select.list(c("hello", "world", "again"), graphics=TRUE) Does it? FYI, I installed R 3.6.3 from source on CentOS 7 a few hours ago, and for me the above works just fine. For your immediate needs of selecting a

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

  1   2   3   4   5   6   7   8   9   10   >