Re: [Rd] R_CheckUserInterrupt() can be a performance bottleneck within GUIs

2024-12-17 Thread Simon Urbanek
It seems benign, but has implications since checking time is actually not a cheap operation: adding jus ta time check alone incurs a penalty of ca. 700% compared with the time it takes to call R_CheckUserInterrupt(). Generally, it makes no sense to check interrupts at every iteration - you'll fi

Re: [Rd] R_CheckUserInterrupt() can be a performance bottleneck within GUIs

2024-12-17 Thread Ben Bolker
This seems like a great idea. Would it help to escalate this to a post on R-bugzilla, so it is less likely to fall through the cracks? On 12/17/24 09:51, Jeroen Ooms wrote: A more generic solution would be for R to throttle calls to R_CheckUserInterrupt(), because it makes no sense to check 1

Re: [Rd] R_CheckUserInterrupt() can be a performance bottleneck within GUIs

2024-12-17 Thread Jeroen Ooms
A more generic solution would be for R to throttle calls to R_CheckUserInterrupt(), because it makes no sense to check 1000 times per second if a user has interrupted, but it is difficult for the caller to know when R_CheckUserInterrupt() has been last called, or do it regularly without over-doing

[Rd] R_CheckUserInterrupt() can be a performance bottleneck within GUIs

2024-12-17 Thread Martin Becker
tl;dr: R_CheckUserInterrupt() can be a performance bottleneck within GUIs. This also affects functions in the 'stats' package, which could be improved by changing the position of calls to R_CheckUserInterrupt(). Dear all, Recently I was puzzled because some code in a packag

[Rd] stats glm Response Format Ambiguity

2024-12-17 Thread Dario Strbenac via R-devel
Hello, Could there be clarification added to glm's documentation? In contrast, glmnet leaves no ambiguity about what it expects for response. glm: y: is a vector of observations of length n glmnet: y: For family="binomial" should be either a factor with two levels, or a two-column matrix of co