Re: [Rd] Packages manually setting NeedsCompilation

2025-05-17 Thread Michael Dewey
This is all a bit above my head but as a Windows user I have always interpreted NeedsCompilation as meaning I could install it without having to wait for binaries to appear on CRAN. I do not need Rtools for my own packages so I have never installed it. Michael On 17/05/2025 09:13, Iñaki Ucar

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-17 Thread Dirk Eddelbuettel
On 17 May 2025 at 10:13, Iñaki Ucar wrote: | El sáb., 17 may. 2025 4:03, Hervé Pagès | escribió: | | > FWIW NeedsCompilation is a misnomer. IIRC when I was discussing this | > feature with R core members many years ago, it doesn't only flag | > packages that require compilation (and thus contai

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-17 Thread Iñaki Ucar
El sáb., 17 may. 2025 4:03, Hervé Pagès escribió: > FWIW NeedsCompilation is a misnomer. IIRC when I was discussing this > feature with R core members many years ago, it doesn't only flag > packages that require compilation (and thus contain arch-specific binary > files), but it is more generally

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-16 Thread Hervé Pagès
FWIW NeedsCompilation is a misnomer. IIRC when I was discussing this feature with R core members many years ago, it doesn't only flag packages that require compilation (and thus contain arch-specific binary files), but it is more generally intended to flag packages that the user wouldn't be abl

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-15 Thread Iñaki Ucar
On Thu, 15 May 2025 at 11:42, Jeroen Ooms wrote: > > On Wed, May 14, 2025 at 11:05 PM Simon Urbanek > wrote: > > > > Can you give an example, please? I wonder if there is a real use-case or > > just bad package design. > > The case that bit me yesterday was a Bioconductor package Rigraphlib, > s

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-15 Thread Dirk Eddelbuettel
On 15 May 2025 at 11:41, Jeroen Ooms wrote: | The case that bit me yesterday was a Bioconductor package Rigraphlib, | see https://bioconductor.org/packages/release/bioc/src/contrib/Rigraphlib_1.0.0.tar.gz | | This package builds a static library entirely from a configure script. | Because there

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-15 Thread Jeroen Ooms
On Wed, May 14, 2025 at 11:05 PM Simon Urbanek wrote: > > Jeroen, > > thanks for raising the issues. Comments inline. > > > > On May 15, 2025, at 1:47 AM, Jeroen Ooms wrote: > > > > R-universe builds and checks all CRAN packages on arm64 on Mac, Linux > > and soon Windows. It is important that we

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-15 Thread Kurt Hornik
> Simon Urbanek writes: Re part II (CRAN packages which have NeedsCompilation: yes but don't really need it): I of course have code for this, last touched in 2016. Running the code (which currently only looks at having a 'src' subdir, based on one possible interpreation of it is normally s

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-14 Thread Simon Urbanek
Jeroen, thanks for raising the issues. Comments inline. > On May 15, 2025, at 1:47 AM, Jeroen Ooms wrote: > > R-universe builds and checks all CRAN packages on arm64 on Mac, Linux > and soon Windows. It is important that we can identify from a binary > package for which architecture it was bui

Re: [Rd] Packages manually setting NeedsCompilation

2025-05-14 Thread Iñaki Ucar
Strongly in favour of Jeroen's suggestions. Thanks for putting them together. Iñaki On Wed, 14 May 2025 at 15:48, Jeroen Ooms wrote: > > R-universe builds and checks all CRAN packages on arm64 on Mac, Linux > and soon Windows. It is important that we can identify from a binary > package for whi

[Rd] Packages manually setting NeedsCompilation

2025-05-14 Thread Jeroen Ooms
R-universe builds and checks all CRAN packages on arm64 on Mac, Linux and soon Windows. It is important that we can identify from a binary package for which architecture it was built. R inserts this information into the second part of the "Built:" field in the DESCRIPTION. For example, packages wit

Re: [Rd] array-bound error with GCC 13/14

2025-05-13 Thread Kurt Hornik
> Stephen Wade writes: Thanks to everyone so far. Indeed, packages GenomeAdmixR SpatialKWD literanger all give the same include/c++/14/bits/stl_algobase.h:452:30 -Warray-bounds= warning for the GCC 14.2.0 compilers used for Debian testing and windows, but not for GCC 15.1.0 used for Fedor

Re: [Rd] array-bound error with GCC 13/14

2025-05-12 Thread Stephen Wade
Thanks, I agree with the course of action, especially given literanger seems to be the only casualty. I'm just making note that the policy doesn't necessarily generate the outcome we want. No policy ever will! I 100% appreciate CRAN volunteers' efforts. In this case, the compiler is generating a f

Re: [Rd] array-bound error with GCC 13/14

2025-05-12 Thread Kevin Ushey
Hi Stephen, I still believe your best option is still to just submit a version of your package that includes a workaround for this compiler issue. You could, in theory, try to contact the CRAN maintainers at c...@r-project.org, and either (1) request an exception for your package, or (2) request

Re: [Rd] array-bound error with GCC 13/14

2025-05-12 Thread Stephen Wade
After (a lot) more work, including looking for MWE (see https://godbolt.org/z/38nnaEcrf), I am confident this is a bug which has already been resolved: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111415. The bug only occurs when optimisation is enabled (-O1 to -O3 at least), on GCC 12.4, 13.1--13

Re: [Rd] Is it possible to gracefully interrupt a child R process on MS Windows?

2025-05-12 Thread Henrik Bengtsson
Thanks all. I can confirm that 'GenerateConsoleCtrlEvent', which Kevin and Ivan referred to, works. I have verified that ps::ps_interrupt() can trigger an interrupt of an Rscript process running in the background, which then R detects as a user-interrupt (think Ctrl-C) and signals an 'interrupt' c

Re: [Rd] Recommend/clarify in ?utils::news that h2/h3 markdown hierarchy is preferable to h1/h2

2025-05-12 Thread Michael Chirico
Sounds good. Moving over to Bugzilla: https://bugs.r-project.org/attachment.cgi?id=3480&action=diff On Mon, May 12, 2025 at 10:29 AM Kurt Hornik wrote: > > > Michael Chirico writes: > > Thanks. Should be ok to change the wording (provided this can be done > without confusing maintainers). >

Re: [Rd] Recommend/clarify in ?utils::news that h2/h3 markdown hierarchy is preferable to h1/h2

2025-05-12 Thread Kurt Hornik
> Michael Chirico writes: Thanks. Should be ok to change the wording (provided this can be done without confusing maintainers). Perhaps you could make a suggestion? :-) Best -k > The current wording in ?utils::news reads to me as implying we should > use `#` and `##` for the respective v

Re: [Rd] on.exit() handler being interrupted by time limit

2025-05-12 Thread Tomas Kalibera
On 4/27/25 22:19, Duncan Murdoch wrote: BTW, the help for setTimeLimit() says that the time limit check happens frequently during `Sys.sleep()`, but that doesn't appear to be true. I've tried a variation on the code above which sleeps for 20 seconds, even with a time limit of 1 second. Re

Re: [Rd] array-bound error with GCC 13/14

2025-05-12 Thread Tomas Kalibera
On 5/9/25 03:09, Stephen Wade wrote: The literanger package is no longer passing on CRAN (https://CRAN.R-project.org/package=literanger) due to array-bound warnings in GCC 13.3 and 14.2 (more details below). This _looks_ to me like one of either a) a compiler bug, b) a false positive, or c) (v

Re: [Rd] Is it possible to gracefully interrupt a child R process on MS Windows?

2025-05-12 Thread Tomas Kalibera
I think for reliability and portability of termination, one needs to implement an application-specific termination protocol on both ends. Only within specific application constraints, one can also define what graceful termination means. Typically, one also has other expectations from the termin

[Rd] Why does format.default skip dispatch for list items?

2025-05-11 Thread Michael Chirico
This is the documented behavior since r35262 (2005), from ?format > If x is a list, the result is a character vector obtained by applying > format.default(x, ...) to each element of the list One consequence is that we can't add "nice" printing methods for list-of-object columns in data.frames:

Re: [Rd] Is it possible to gracefully interrupt a child R process on MS Windows?

2025-05-11 Thread Ivan Krylov via R-devel
On Sun, 11 May 2025 10:58:18 -0700 Henrik Bengtsson wrote: > Is it possible to gracefully interrupt a child R process on MS > Windows, e.g. a PSOCK cluster node? Not in the general case (I think, based on the code paths leading to Rf_onintr() on Windows), but PSOCK cluster nodes are instances of

[Rd] Is it possible to gracefully interrupt a child R process on MS Windows?

2025-05-11 Thread Henrik Bengtsson
In help("pskill", package = "tools") is says: Only SIGINT and SIGTERM will be defined on Windows, and pskill will always use the Windows system call TerminateProcess. As far as I understand it, TerminateProcess [1] terminates the process "quite abruptly". Specifically, it is not possible for th

Re: [Rd] array-bound error with GCC 13/14

2025-05-09 Thread Olivier Benz via R-devel
> On 9 May 2025, at 19:29, Kevin Ushey wrote: > > Hopefully a member of the CRAN team will tell me I'm wrong, but I > think whether or not there is a compiler bug is ultimately irrelevant > -- packages on CRAN must compile cleanly even with potentially-buggy > development versions of compilers.

Re: [Rd] array-bound error with GCC 13/14

2025-05-09 Thread Kevin Ushey
Hopefully a member of the CRAN team will tell me I'm wrong, but I think whether or not there is a compiler bug is ultimately irrelevant -- packages on CRAN must compile cleanly even with potentially-buggy development versions of compilers. So, whether or not there is a bug in gcc is moot -- you'll

Re: [Rd] array-bound error with GCC 13/14

2025-05-09 Thread Ivan Krylov via R-devel
В Fri, 9 May 2025 11:09:22 +1000 Stephen Wade пишет: > inlined from ‘std::vector literanger::adjust_pvalues(const > std::vector&)’ at ../src/literanger/utility_math.h:99:48: > /usr/include/c++/13/bits/stl_algobase.h:437:30: warning: ‘void* > __builtin_memmove(void*, const void*, long unsigned

[Rd] array-bound error with GCC 13/14

2025-05-08 Thread Stephen Wade
The literanger package is no longer passing on CRAN (https://CRAN.R-project.org/package=literanger) due to array-bound warnings in GCC 13.3 and 14.2 (more details below). This _looks_ to me like one of either a) a compiler bug, b) a false positive, or c) (very unlikely) something in the standard l

[Rd] Recommend/clarify in ?utils::news that h2/h3 markdown hierarchy is preferable to h1/h2

2025-05-05 Thread Michael Chirico
The current wording in ?utils::news reads to me as implying we should use `#` and `##` for the respective version, category headings [1]: > File NEWS.md should contain the news in Markdown..., with the > primary heading level giving the version number... Where available, > secondary headings are t

Re: [Rd] sqrt(.Machine$double.xmax)^2 == Inf, but only on Windows in R

2025-05-05 Thread Tomek Gieorgijewski
Hello! My three Groschen: On MacOS (Intel CPU) and R 4.4.3 I report: > dput(.Machine$double.xmax, control = 'hex') 0x1.fp+1023 > dput(sqrt(.Machine$double.xmax), control = 'hex') 0x1.fp+511 > dput(sqrt(.Machine$double.xmax)^2, control = 'hex') 0x1.ep+1023 so as

Re: [Rd] sqrt(.Machine$double.xmax)^2 == Inf, but only on Windows in R

2025-04-29 Thread Ivan Krylov via R-devel
On Tue, 29 Apr 2025 12:00:09 +0200 Martin Maechler wrote: > Would you (or anybody else) know if this is new behaviour or it > also happened e.g. in R 4.4.x versions on Windows? R-4.3.1 on Windows 7 in a virtual machine gives: dput(sqrt(.Machine$double.xmax), control = 'hex') # 0x1p+512 sqrt(.M

Re: [Rd] sqrt(.Machine$double.xmax)^2 == Inf, but only on Windows in R

2025-04-29 Thread Martin Maechler
> Pavel Krivitsky via R-devel > on Mon, 28 Apr 2025 05:13:41 + writes: > Hello, Under R 4.5.0 on Windows (x86-64), I get: >> sqrt(.Machine$double.xmax)^2 > [1] Inf >> sqrt(.Machine$double.xmax)*sqrt(.Machine$double.xmax) > [1] Inf > On other hand on other

[Rd] sqrt(.Machine$double.xmax)^2 == Inf, but only on Windows in R

2025-04-27 Thread Pavel Krivitsky via R-devel
Hello, Under R 4.5.0 on Windows (x86-64), I get: > sqrt(.Machine$double.xmax)^2 [1] Inf > sqrt(.Machine$double.xmax)*sqrt(.Machine$double.xmax) [1] Inf On other hand on other platforms, including Debian Linux (x86-64), I get: d> sqrt(.Machine$double.xmax)^2 [1] 1.797693134862315508561e+308 d> s

[Rd] on.exit() handler being interrupted by time limit

2025-04-27 Thread Duncan Murdoch
This StackOverflow question: https://stackoverflow.com/q/79594532 and this discussion on Github: https://github.com/r-lib/evaluate/issues/242 are talking about an interesting situation. Under a fairly simple setup shown in both, setTimeLimit() can interrupt the on.exit() handler that was ins

[Rd] Complex numbers and negative zeroes

2025-04-26 Thread Mikael Jagan
0 and 0i are parsed as constants with 'positive zero' real and imaginary parts, whereas 0, 0i, and 00i are parsed as *calls*: 0~ ( 0 ) 0i ~ ( 0i) 00i ~ ((0), 0i) Keeping in mind R's usual arithmetic conversions and the IEEE 754 standard which defines e

[Rd] Complex numbers and negative zeroes

2025-04-26 Thread Antoine Fabri
Dear r-devel, In R `sign(0)` and `sign(-0)` both return `0` but negative zeroes do exist in the sense that dividing by them gives `-Inf` Complex numbers behave oddly with negative 0s, see below: ``` r 1 / Re(0 + 0i) #> [1] Inf 1 / Im(0 + 0i) #> [1] Inf 1 / Re(0 - 0i) #> [1] Inf 1 / Im(0 - 0i) # n

Re: [Rd] R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP

2025-04-24 Thread Michael Chirico
Is it correct to say the desired behavior in the long term is for such an error to occur? If so, could we make it so the --enable-strict-barrier (or other option) behavior educes those errors for developers to opt in to finding them sooner than later? On Wed, Apr 23, 2025 at 3:43 PM Tomas Kaliber

Re: [Rd] R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP

2025-04-23 Thread Tomas Kalibera
On 4/24/25 00:18, Michael Chirico wrote: In that case it seems like just erroring instead of returning invalid pointers is a much friendlier option. Why give developers an unpinned grenade to carry around? That would be too strict at this point. There is too much code around depending on tha

Re: [Rd] R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP

2025-04-23 Thread Michael Chirico
In that case it seems like just erroring instead of returning invalid pointers is a much friendlier option. Why give developers an unpinned grenade to carry around? On Wed, Apr 23, 2025 at 1:38 PM Tomas Kalibera wrote: > > On 4/23/25 19:03, Michael Chirico wrote: > > h/t Tim Taylor for pointing o

Re: [Rd] R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP

2025-04-23 Thread Michael Chirico
h/t Tim Taylor for pointing out my blindspot :) We have Memcpy() in API already [1], which wraps a 0-aware R_chk_memcpy() [2]. We don't quite have Memset() in API, though; instead we have Memzero() [3] for R_chk_memset(s, 0, n) which is 0-aware memset() [4]. [1] https://github.com/r-devel/r-svn

[Rd] R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP

2025-04-23 Thread Michael Chirico
>From R 4.5.0 [1], all builds of R discourage use of INTEGER() [and friends REAL(), ... and *_RO() equivalents] on length-0 SEXP [2]. Before R 4.5.0, this was the behavior under --enable-strict-barrier. That means the following can segfault under strict builds (e.g. -fsanitize=alignment and -O0):

Re: [Rd] R Dev Day @ RSECon25, Fri 12 Sep, Warwick University - travel funding available!

2025-04-22 Thread Heather Turner
A reminder that the application deadline for this event is coming up - I put the wrong day in the original email below, the deadline is **Wednesday, 23 April (midnight anywhere on earth).** On Wed, Apr 2, 2025, at 1:43 PM, Heather Turner wrote: > Dear All, > > There will be another R Dev Day aft

Re: [Rd] r-base: FTBFS: Add "${boot_path}/zero" for OpenJDK zero build

2025-04-17 Thread Simon Urbanek
Dandan, thanks! Dirk reported it as https://bugs.r-project.org/show_bug.cgi?id=18884 and it should be fixed in R-devel r88154 - please confirm if it works for you and if it does, I'll port it to R 4.5.0 Patched. Cheers, Simon > On Apr 17, 2025, at 3:40 PM, zhangdandan wrote: > > Source: r-

Re: [Rd] r-base: FTBFS: Add "${boot_path}/zero" for OpenJDK zero build

2025-04-17 Thread Dirk Eddelbuettel
On 17 April 2025 at 11:40, zhangdandan wrote: | Source: r-base | Version: 4.5.0-1 | Severity: normal | Tags: FTBFS patch | User: debian-loonga...@lists.debian.org | Usertags: loong64 | | Hi maintainers, | | Compiling the rjava 1.0-11-1 failed for loong64 in the Debian Package | Auto-Building e

[Rd] r-base: FTBFS: Add "${boot_path}/zero" for OpenJDK zero build

2025-04-17 Thread zhangdandan
Source: r-base Version: 4.5.0-1 Severity: normal Tags: FTBFS patch User: debian-loonga...@lists.debian.org Usertags: loong64 Hi maintainers, Compiling the rjava 1.0-11-1 failed for loong64 in the Debian Package Auto-Building environment. The build error log(build error on 10 architectures)  is

[Rd] Inappropriate modifications to R C source related to bool

2025-04-16 Thread Suharto Anggono Suharto Anggono via R-devel
src/main/attrib.c r87863 'TRUE' is not replaced with 'true' in functions 'row_names_gets',  'isOneDimensionalArray', 'getAttrib0', 'copyMostAttribNoTs', 'classgets',  'R_data_class2'. But it works fine. src/main/main.c r87863 'FALSE' is not replaced with 'false' in bool wasDisplayed = FALSE;

Re: [Rd] R does not build with conda libcurl

2025-04-15 Thread Kasper Daniel Hansen
Toby, I know this is not what you're asking for, but when I build R from source within a conda environment I make sure I use the conda compilers. I think what you might be doing is using system compilers with conda libraries that may have been built using a different compiler. Not saying this is

Re: [Rd] [EXTERNAL] Re: Request for comment: namespace resolution in terms(, specials=) [::, etc.]

2025-04-15 Thread Therneau, Terry M., Ph.D. via R-devel
Peter,    I had an argument with someone at one of the big companies (google?) several years ago over the coding standard you mention, who was claiming that the survival package had a bug due to a wrong result using survival::strata() in a formula.   I argued back. I agree with you that names

Re: [Rd] Help with resolving non-API call warnings in Rust-based packages (ymd and fcl)

2025-04-15 Thread Josiah Parry
25 10:27 > To 谭显英 > Cc r-devel@r-project.org > Subject Re: [Rd] Help with resolving non-API call warnings in Rust-based > packages (ymd and fcl) > Please update your Makevars template using the development version of > rextendr. > > Please see: > https://github.com/extend

Re: [Rd] Request for comment: namespace resolution in terms(, specials=) [::, etc.]

2025-04-15 Thread peter dalgaard
I don't seem to have the original post (not in spamfilter either). But generically, I think namespacing specials in formulas is just a Bad Idea. They are syntactic constructs, specifically _not_ function calls, so people are stumbling over formally protecting them from a non-existing scoping iss

Re: [Rd] Help with resolving non-API call warnings in Rust-based packages (ymd and fcl)

2025-04-14 Thread 谭显英
Thanks. I confirmed the issue has been resolved by following the instructions in your link. Regards, Xianying Tan (shrektan) Replied Message | From | Josiah Parry | | Date | 04/15/2025 10:27 | | To | 谭显英 | | Cc | r-devel@r-project.org | | Subject | Re: [Rd] Help with resolving

Re: [Rd] Help with resolving non-API call warnings in Rust-based packages (ymd and fcl)

2025-04-14 Thread Josiah Parry
Please update your Makevars template using the development version of rextendr. Please see: https://github.com/extendr/extendr/releases/tag/extendr-api-v0.8.0 On Mon, Apr 14, 2025 at 18:59 谭显英 wrote: > Dear R-devel list, > > > I maintain two packages that use Rust code through the "extendr" lib

[Rd] Help with resolving non-API call warnings in Rust-based packages (ymd and fcl)

2025-04-14 Thread 谭显英
Dear R-devel list, I maintain two packages that use Rust code through the "extendr" library: ymd (https://github.com/shrektan/ymd) and fcl (https://github.com/shrektan/fcl) . These packages are currently at risk of being removed from CRAN due to calls to R's non-API functions. I've addressed

Re: [Rd] Request for comment: namespace resolution in terms(, specials=) [::, etc.]

2025-04-14 Thread Ben Bolker
I don't have any concerns about these changes, don't see any need to preserve the old behaviour. In lme4 and glmmTMB (and now broken out into a separate `reformulas` package, I do this the hard way, walking down the parse trees of formula objects and looking for specials, and not using the

Re: [Rd] R does not build with conda libcurl

2025-04-14 Thread Ivan Krylov via R-devel
On Mon, 14 Apr 2025 14:10:56 +0200 Toby Hocking wrote: > /usr/bin/ld : ../../lib/libR.so : référence indéfinie vers > « u_getVersion_73 » Strange that it's complaining about symbols from libicu when the problem is due to libcurl-related flags. What was the command line used to link libR.so somew

[Rd] R does not build with conda libcurl

2025-04-14 Thread Toby Hocking
Hi all, I'm not sure if this is an issue with conda or R. I expected that I should be able to build R from source, with a conda environment active. However, I observe that with conda 23.9.0, in an environment with libcurl package installed, I get a link error. The configure works fine: (base) hoct

Re: [Rd] table() and as.character() performance for logical values

2025-04-14 Thread Martin Maechler
> Suharto Anggono Suharto Anggono > on Sat, 12 Apr 2025 08:27:26 + (UTC) writes: > For NA case (x == NA_LOGICAL), if R_print.na_width > NB-1 , the "fast path" for 'EncodeLogical' that I propose previously behaves differently from the general case that truncates at (NB-1). Y

Re: [Rd] should the top of doc/NEWS.3 mention doc/NEWS.Rd ?

2025-04-13 Thread peter dalgaard
Also, the files do exist in the build directory after R has been built. I suppose that we could copy them into the sources for the distribution, but generically, it is bad luck for tarballs to include both sources and build results because it confuses the Makefile dependencies (& we have plenty

Re: [Rd] should the top of doc/NEWS.3 mention doc/NEWS.Rd ?

2025-04-13 Thread Duncan Murdoch
On 2025-04-13 11:07 a.m., Benjamin Tyner wrote: Greetings, As of r80088, at the top of doc/NEWS.3 file it says: LATER NEWS:   • News for R 4.x.y can be found in HTML format at doc/html/NEWS.html,     and in text format in file NEWS in the doc directory. However as far as I can tell, neithe

[Rd] should the top of doc/NEWS.3 mention doc/NEWS.Rd ?

2025-04-13 Thread Benjamin Tyner
Greetings, As of r80088, at the top of doc/NEWS.3 file it says: LATER NEWS:   • News for R 4.x.y can be found in HTML format at doc/html/NEWS.html,     and in text format in file NEWS in the doc directory. However as far as I can tell, neither NEWS nor NEWS.html exists in the R source. Should

Re: [Rd] table() and as.character() performance for logical values

2025-04-12 Thread Suharto Anggono Suharto Anggono via R-devel
For NA case (x == NA_LOGICAL), if R_print.na_width > NB-1 , the "fast path" for 'EncodeLogical' that I propose previously behaves differently from the general case that truncates at (NB-1). To be consistent with the general case, if(w == R_print.na_width) can be replaced with if(w == R_print.na_

Re: [Rd] Check for protection

2025-04-11 Thread Tomas Kalibera
On 4/11/25 17:39, Duncan Murdoch wrote: On a tangent from the main topic of this thread:  sometimes (especially to non-experts) it's not obvious whether a variable is protected or not. I don't think there's any easy way to determine that, but perhaps there should be.  Would it be possible to

Re: [Rd] Check for protection

2025-04-11 Thread Duncan Murdoch
That might help, but protecting things is a fairly cheap operation, so I don't know if people would bother with the naming convention. It's just as easy to just protect things if you're not sure. One way things can go wrong is when you think you protected something, but then the pointer chang

Re: [Rd] table() and as.character() performance for logical values

2025-04-11 Thread Tomas Kalibera
On 4/11/25 16:23, Suharto Anggono Suharto Anggono via R-devel wrote: Alternative revision: Added to my changed 'StringFromLogical': #define CACHE 16 if (!(*warn & CACHE)) {TrueCh = FalseCh = NULL; *warn |= CACHE;} No change to 'coerceToString' and 'coerceToSymbol'. -- On Friday

Re: [Rd] Check for protection (was: table() and as.character() performance for logical values)

2025-04-11 Thread Paul McQuesten
For a long-term horizon, would it help R developers to use a naming convention? Perhaps, varName_PROT, or the inverse varName_UNPROT? Eventually, teach some linter about that? On Fri, Apr 11, 2025 at 10:40 AM Duncan Murdoch wrote: > On a tangent from the main topic of this thread: sometimes (es

[Rd] Check for protection (was: table() and as.character() performance for logical values)

2025-04-11 Thread Duncan Murdoch
On a tangent from the main topic of this thread: sometimes (especially to non-experts) it's not obvious whether a variable is protected or not. I don't think there's any easy way to determine that, but perhaps there should be. Would it be possible to add a run-time test you could call in C c

Re: [Rd] table() and as.character() performance for logical values

2025-04-11 Thread Suharto Anggono Suharto Anggono via R-devel
Alternative revision: Added to my changed 'StringFromLogical': #define CACHE 16 if (!(*warn & CACHE)) {TrueCh = FalseCh = NULL; *warn |= CACHE;} No change to 'coerceToString' and 'coerceToSymbol'. -- On Friday, 11 April 2025 at 08:02:58 pm GMT+7, Suharto Anggono Suharto Anggono wr

Re: [Rd] table() and as.character() performance for logical values

2025-04-11 Thread Suharto Anggono Suharto Anggono via R-devel
Oh, with the abuse of 'warn' in my previous message, warning would be issued if the input 'v' of 'coerceToString' is a logical vector of length 1. Revision: Added to my changed 'StringFromLogical': if (*warn) {TrueCh = FalseCh = NULL; *warn = 0;} 'coerceToString': insert if (i == 0) warn = 1;

Re: [Rd] table() and as.character() performance for logical values

2025-04-11 Thread Suharto Anggono Suharto Anggono via R-devel
On second thought, I wonder if the caching in my changed 'StringFromLogical' in my previous message is safe. While 'ans' in the C function 'coerceToString' is protected, its element is also protected. If the object corresponding to 'ans' is then no longer protected, is it possible for the cache

[Rd] R 4.5.0 is released

2025-04-11 Thread peter dalgaard
ting in download.file() has been extended to report the outcome for individual files in simultaneous downloads. • The Rd \link macro now allows markup in the link text when the topic is given by the optional argument, e.g., \link[=gamma]{\eqn{\Gamma(x)}}. • If La_library(

Re: [Rd] Better support ESS by allowing choice of CRAN mirror using the `menu-choice` widget

2025-04-10 Thread Bryce Carson
I know ESS already has a better interface for installing packages, C-c C-e TAB, but it'd be "neat" if when I forget to do this and I call install.packages() without first setting a mirror that either the same interface would be presented rather than Tcl/Tk, or a widget.el-based interface was presen

Re: [Rd] table() and as.character() performance for logical values

2025-04-10 Thread Sebastian Meyer
Right, thanks! These are non-standard uses of factor(), edge cases I alluded to. We didn't see any problems with the patch in existing tests nor in CRAN/BIOC package checks. Note that 'levels' is documented as an optional vector of the unique values (as character strings) that ‘x’ might

Re: [Rd] table() and as.character() performance for logical values

2025-04-10 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Thu, 10 Apr 2025 07:53:04 + (UTC) writes: > Chain of calls of C functions in coerce.c for as.character() in R: > do_asatomic > ascommon > coerceVector > coerceToString > StringFromLogical (for each elemen

Re: [Rd] table() and as.character() performance for logical values

2025-04-10 Thread Suharto Anggono Suharto Anggono via R-devel
Chain of calls of C functions in coerce.c for as.character() in R: do_asatomic ascommon coerceVector coerceToString StringFromLogical (for each element) The definition of 'StringFromLogical' in coerce.c : attribute_hidden SEXP StringFromLogical(int x, int *warn) { int w; formatLogical(&x,

Re: [Rd] Better support ESS by allowing choice of CRAN mirror using the `menu-choice` widget

2025-04-09 Thread Bryce Carson
I see, a profile option is a good idea. I think I will tinker with the ESS package a bit regardless and see what interesting things can be done. On Wed., Apr. 9, 2025, 7:02 p.m. Dirk Eddelbuettel, wrote: > > On 8 April 2025 at 23:15, Bryce Carson wrote: > | I know ESS already has a better inter

Re: [Rd] Better support ESS by allowing choice of CRAN mirror using the `menu-choice` widget

2025-04-09 Thread Dirk Eddelbuettel
On 8 April 2025 at 23:15, Bryce Carson wrote: | I know ESS already has a better interface for installing packages, C-c C-e | TAB, but it'd be "neat" if when I forget to do this and I call | install.packages() without first setting a mirror that either the same | interface would be presented rathe

Re: [Rd] table() and as.character() performance for logical values

2025-04-08 Thread Suharto Anggono Suharto Anggono via R-devel
With the change to 'factor', factor(1L, levels = TRUE) doesn't give NA, different from factor(1, levels = TRUE) With the change to 'factor', factor(TRUE, levels = 1L) and factor(TRUE, levels = 1) don't give NA. With the change to 'factor', factor(2L, levels = sqrt(2)^2) gives NA, different from f

[Rd] Better support ESS by allowing choice of CRAN mirror using the `menu-choice` widget

2025-04-08 Thread Bryce Carson
This would allow ESS to be used in a graphical-mode emacs without utilizing the Tcl/Tk widget, and on non-Linux platforms would allow Emacs to provide the choice widget rather than Tcl/Tk, Aqua, or whatever Windows does. [[alternative HTML version deleted]] ___

Re: [Rd] Proposal: Integrating Rust Toolchain into Rtools for Rust-Based R Package Development

2025-04-07 Thread Sun Wenjie
Hi Tomas, Thank you very much for the detailed and thoughtful reply. Your explanation really helped me better understand the architecture of Rtools. You're absolutely right that a **ideal** integration of Rust into Rtools would ideally involve extending the MXE-based toolchain, as the same comp

Re: [Rd] WRE Date field & CRAN

2025-04-06 Thread Lluís Revilla
Hi Duncan, Thanks for the fast check and reply. Indeed, the documentation is correct. I just think it can be interpreted as saying Date is required to submit to CRAN. Some package maintainers have been using the Date field, probably interpreting this section this way because if you read the main

Re: [Rd] WRE Date field & CRAN

2025-04-06 Thread Duncan Murdoch
On 2025-04-06 10:55 a.m., Lluís Revilla wrote: Hi, On Writing R Extensions there is a footnote [6] about the "Date" field on the DESCRIPTION file being required by CRAN: "required by CRAN, so checked by R CMD check --as-cran" I think this is no longer up to date, as I've seen packages publishe

[Rd] WRE Date field & CRAN

2025-04-06 Thread Lluís Revilla
Hi, On Writing R Extensions there is a footnote [6] about the "Date" field on the DESCRIPTION file being required by CRAN: "required by CRAN, so checked by R CMD check --as-cran" I think this is no longer up to date, as I've seen packages published on CRAN without it. This might be because now t

Re: [Rd] Patch for RJSONIO

2025-04-05 Thread Kurt Hornik
> Dirk Eddelbuettel writes: Great, thanks! Will put up a fixed RJSONIO shortly ... Best -k > I can never remember where the canonical sources are for the effectively-CRAN > maintained packages so I am dropping it here -- yesterday's update to RJSONIO > does not build on anything older than

[Rd] request for discussion on lonely doc patch suggestion

2025-04-05 Thread Ben Bolker
Aki Vehtari and I suggested a revision to some of the man pages involving NA/is.nan/is.na about a year ago, but it never seems to have gotten any traction. https://bugs.r-project.org/show_bug.cgi?id=18691 Discussion here: https://fediscience.org/@aveht...@bayes.club/112043521852737720 Th

Re: [Rd] structure(, ...) is sticky: a bug, or should it be an error?

2025-04-05 Thread Henrik Bengtsson
> I'm pretty convinced we should fix it by checking for primitive > functions inside the C code of `attributes<-` : > arguably the bug is really there, rather than in structure(). > > Patches are welcome (via R's Bugzilla or just here). Thank you Martin. I'll make sure I create a brief BugZilla re

Re: [Rd] Suppressed "graphical parameter" warnings reviving themselves magically

2025-04-05 Thread Duncan Murdoch
I don't know what's going on, but I see a version of it in R 4.4.2 on MacOS in the console, but not in R.app. The difference is I only get one of the warnings, and only on the first attempt: $ R R version 4.4.2 (2024-10-31) -- "Pile of Leaves" Copyright (C) 2024 The R Foundation for Statist

Re: [Rd] request for discussion on lonely doc patch suggestion

2025-04-05 Thread Duncan Murdoch
Thanks for the suggestion. I did a quick scan of the delta manual, but couldn't spot anything on integration with svn, just git. Have you worked out the necessary config options for svn so that it would work with diffs like Ben's, or for running `svn diff` on some local changes? Currently I

[Rd] Bad URLs in DESCRIPTION files

2025-04-05 Thread Colin Gillespie
Hi All, Just want to flag a few packages: MatrixLDA: https://cran.r-project.org/web/packages/MatrixLDA/index.html The URL is technically valid - ajmols...@github.io/ - but returns a 404. Almost certainly a typo. redistmetrics: https://cran.r-project.org/web/packages/redistmetrics/index.html Not

Re: [Rd] R CMD check and CRAN's Rust policy

2025-04-04 Thread Josiah Parry
t; and https://github.com/extendr/hellorustc > > <https://github.com/extendr/hellorustc> > > >>> <https://github.com/extendr/hellorustc > > <https://github.com/extendr/hellorustc>>, which showcases how Rust > > >>>

Re: [Rd] R CMD check and CRAN's Rust policy

2025-04-04 Thread Duncan Murdoch
>>  > side-stepping `cargo` / crates.io     <http://crates.io> <http://crates.io <http://crates.io>> >     <http://crates.io <http://crates.io> <http://crates.io     <http://crates.io>>>, we are >      >>&g

Re: [Rd] Problems with ::

2025-04-04 Thread Duncan Murdoch
On 2025-03-19 12:49 p.m., Therneau, Terry M., Ph.D. via R-devel wrote: In response to the tidyverse habit of adding another zillion functions to one's search space, the use of things like survival::coxph is becoming more common. But this practice breaks the use of the specials argument in term

Re: [Rd] structure(, ...) is sticky: a bug, or should it be an error?

2025-04-04 Thread Henrik Bengtsson
On Fri, Mar 21, 2025 at 8:55 AM Martin Maechler wrote: > > > Martin Maechler > > on Fri, 21 Mar 2025 14:49:16 +0100 writes: > > > Henrik Bengtsson > > on Thu, 20 Mar 2025 11:55:05 -0700 writes: > > >>> I'm pretty convinced we should fix it by checking for > >>> prim

Re: [Rd] Bad URLs in DESCRIPTION files

2025-04-04 Thread Kurt Hornik
> Colin Gillespie writes: >> I'm surprised this wasn't captured by the url checker on CRAN. > As was I >> Are you suggesting a new check on package descriptions for the urls present? > Yes - but more fixing edge cases than a new check >> In that case I guess it could be part of the standard

Re: [Rd] Bad URLs in DESCRIPTION files

2025-04-04 Thread Colin Gillespie
> I'm surprised this wasn't captured by the url checker on CRAN. As was I > Are you suggesting a new check on package descriptions for the urls present? Yes - but more fixing edge cases than a new check > In that case I guess it could be part of the standard R CMD check. Yep. Kurt's message sugg

[Rd] R Dev Day @ RSECon25, Fri 12 Sep, Warwick University - travel funding available!

2025-04-03 Thread Heather Turner
Dear All, There will be another R Dev Day after RSECon25, on Friday 12 Sep, Warwick University, UK. Travel funding is available - for participants from UK/Europe, this will cover travel plus up to 2 nights accommodation and for participants from the Global South this will cover travel plus up

Re: [Rd] Bad URLs in DESCRIPTION files

2025-04-03 Thread Lluís Revilla
Hi Colin, I'm surprised this wasn't captured by the url checker on CRAN. Are you suggesting a new check on package descriptions for the urls present? In that case I guess it could be part of the standard R CMD check. Lluís On Thu, 3 Apr 2025 at 17:17, Colin Gillespie wrote: > Hi All, > > Just

Re: [Rd] Proposal: Integrating Rust Toolchain into Rtools for Rust-Based R Package Development

2025-04-03 Thread Tomas Kalibera
Congratulations on figuring out how to extend the build of the Rtools installer to add more programs there - it is always good to have a confirmation such things are clear enough from the available documentation and sources. You can see that e.g. QPDF is added this way, but adding a toolchain r

Re: [Rd] Proposal: Integrating Rust Toolchain into Rtools for Rust-Based R Package Development

2025-04-03 Thread Avraham Adler
Hello, Wenjie. If you are specifically interested in Windows, Tomas Kalibera is the keeper of Rtools for Windows and it has its own list at R-sig-windows which may provide more focus. Thank you, Avi Sent from my iPhone > On Apr 3, 2025, at 7:30 AM, Sun Wenjie wrote: > > Dear R-devel com

[Rd] Proposal: Integrating Rust Toolchain into Rtools for Rust-Based R Package Development

2025-04-03 Thread Sun Wenjie
Dear R-devel community, I'm exploring (experimentally) the integration of the Rust toolchain into Rtools, to enable smoother development and shipping of Rust-based R packages on Windows. I've written a detailed blog post documenting the process, technical rationale and what’s next: https://medi

[Rd] Enable compression in download.file()

2025-04-03 Thread Jeroen Ooms
Comparing download times of base R and the curl package: url <- 'https://jeroen.github.io/data/nycflights13.json' tmp <- tempfile() system.time(download.file(url, tmp, quiet = F) system.time(curl::curl_download(url, tmp, quiet = F)) Because this is an uncompressed file, the gzipped downlo

  1   2   3   4   5   6   7   8   9   10   >