[Rd] as.list.factor() should shift input names onto the resulting list

2021-10-20 Thread Davis Vaughan
Hi all, The current implementation of as.list.factor() looks like: as.list.factor #> function (x, ...) #> { #> res <- vector("list", length(x)) #> for (i in seq_along(x)) res[[i]] <- x[i] #> res #> } #> #> I believe this is incorrect, as names of `x` are not shifted onto `res`.

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?

Re: [Rd] stats::fft produces inconsistent results

2021-10-20 Thread Dipterix Wang
Wow, you guys are amazing! >>> as part of its pipeline, ravetools::mvfftw computes the mean of the >>> input vector **and then centers it to a mean of zero** (intentionally or >>> accidentally?) > >>> because variables are passed to compiled code by reference (someone >>> can feel free to

Re: [Rd] stats::fft produces inconsistent results

2021-10-20 Thread GILLIBERT, Andre
Hello, That sounds like a good diagnosis! Indeed, R vectors are passed "by reference" to C code, but the semantic must be "by value", i.e. the C function must NOT change the contents of the vector, except in very specific cases. A good program that has to work on a vector, must first duplicate

Re: [Rd] Environment setting _R_CHECK_DEPENDS_ONLY_='true'

2021-10-20 Thread Sebastian Meyer
(this should have been posted to R-package-devel, not R-devel) Am 20.10.21 um 00:17 schrieb John Maindonald via R-devel: Setting Sys,setenv('_R_CHECK_DEPENDS_ONLY_'=‘true’) or Sys,setenv('_R_CHECK_DEPENDS_ONLY_’=TRUE) (either appear to be acceptable) appears to have no effect when I do, e.g.

Re: [Rd] stats::fft produces inconsistent results

2021-10-20 Thread Martin Maechler
> Martin Maechler > on Wed, 20 Oct 2021 11:26:21 +0200 writes: [] > Thank you, André , that's very good. > Just to state the obvious conclusion: > If Ben's suggestion is correct (and André has explained *how* > that could happen) this would mean a

Re: [Rd] stats::fft produces inconsistent results

2021-10-20 Thread Martin Maechler
> GILLIBERT, Andre > on Wed, 20 Oct 2021 08:10:00 + writes: > Hello, > That sounds like a good diagnosis! > Indeed, R vectors are passed "by reference" to C code, but the semantic must be "by value", i.e. the C function must NOT change the contents of the vector,

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

2021-10-20 Thread Michał Bojanowski
Hello Tomas, Yes, that's accurate although rather terse, which is perhaps the reason why I did not realize it applies to my case. How about adding something in the direction of: 1. Continuing the cited paragraph with: In particular, on Windows it may be necessary to quote references to existing

[Rd] R Contribution Working Group

2021-10-20 Thread Heather Turner
Dear All, The R Contribution Working Group was set up last year with the purpose of encouraging new contributors to R core, especially from currently under-represented groups. More detail here: https://forwards.github.io/rcontribution/working-group. The group has been meeting approximately

Re: [Rd] Environment setting _R_CHECK_DEPENDS_ONLY_='true'

2021-10-20 Thread Dirk Eddelbuettel
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,

[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: [R-pkg-devel] How does one install a libtool generated libfoo.so.1 file into ./libs/?

2021-10-20 Thread Simon Urbanek
Pariksheet, dynamic linking won't work, compile a static version with PIC enabled. If the subproject is autoconf-compatible this means using --disable-shared --with-pic. Then you only need to add libfoo.a to your PKG_LIBS. Cheers, Simon > On Oct 19, 2021, at 4:13 PM, Pariksheet Nanda >

Re: [R-pkg-devel] Concise Summary For Any Variety Of R Function

2021-10-20 Thread Simon Urbanek
Dario, there is not such thing as S4 function. However, all functions have an environment and for functions from packages that environment will be the namespace of the package. So in those special cases you can use environmentName() to get the name, e.g.: > who = function(f)

[R-pkg-devel] CRAN Mac Builder based on M1

2021-10-20 Thread Simon Urbanek
Dear Mac useRs. I'm pleased to announce that thanks to the R Foundation and donations from users like you we are now able to offer a CRAN Mac Builder based on M1 hardware which allows package authors that don't have access to a recent Mac to check their package using the same process as

Re: [R-pkg-devel] Is there a better way ...?

2021-10-20 Thread Deepayan Sarkar
On Thu, Oct 21, 2021 at 9:59 AM Rolf Turner wrote: > > > I have a plot method (say plot.foo()) that I want to be able to call so > that if argument "add" is set equal to TRUE, then further structure will > be added to the same plot. This is to be used *only* in the context in > which the plot

Re: [R-pkg-devel] Is there a better way ...?

2021-10-20 Thread Andrew Simmons
I think the simplest answer is to store the variable in the functions frame. I'm assuming here that the only plot.foo needs access to .fooInfo, if not this can be changed. plot.foo <- function (...) { .fooInfo } environment(plot.foo) <- new.env() evalq({ .fooInfo <- NULL },

[R-pkg-devel] Is there a better way ...?

2021-10-20 Thread Rolf Turner
I have a plot method (say plot.foo()) that I want to be able to call so that if argument "add" is set equal to TRUE, then further structure will be added to the same plot. This is to be used *only* in the context in which the plot being added to was created using plot.foo(). [Please don't ask

Re: [R-pkg-devel] failing S3 dispatch

2021-10-20 Thread Duncan Murdoch
On 19/10/2021 3:43 p.m., Jens Oehlschlägel wrote: I didn't find an answer elsewhere: My package 'bit' creates a S3 generic 'clone' and exports it. Furthermore it registers a S3 method 'clone.default' (not exported). My package 'ff' imports package 'bit' and exports and registers a new S3

Re: [R-pkg-devel] failing S3 dispatch

2021-10-20 Thread Jens Oehlschlägel
Thank you Duncan, bit NAMESPACE has S3method(clone,default) export(clone) ff NAMESPACE has import(bit) # wish of CRAN maintainers: export another time here (now maintained and exported in bit) # without this R CMD CHECK complained, but with it R CMD CHECK complains also, how to export again

[Bioc-devel] NxtIRFcore build error; missing recently submitted data package NxtIRFdata

2021-10-20 Thread Alex Wong via Bioc-devel
Hi, My recently accepted software package NxtIRFcore has failed to build / install because its dependency (experimental data package NxtIRFdata, also recently accepted) is not yet available on the build systems. I understand that software packages are built daily whereas experimental data

[Bioc-devel] Package name

2021-10-20 Thread Laurent Gatto
The Package Guidelines for Developers and Reviewers say that: A package name should be descriptive and should not already exist as a current package (case-insensitive) in Bioconductor nor CRAN. The sentences says current packages - does that imply that names of packages that have been archived

[Bioc-devel] Deprecation of scClassifR

2021-10-20 Thread Johannes Griss
Hi everyone, Since scAnnotatR (the renamed version of scClassifR) is now available, we'd like to deprecate scClassifR. We'd be grateful if you could point us in the right direction. Thanks a lot! Johannes ___ Bioc-devel@r-project.org mailing