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

2024-12-18 Thread Sokol Serguei via R-devel
Le 18/12/2024 à 13:16, Tomas Kalibera a écrit : On 12/18/24 01:19, Simon Urbanek wrote: 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_CheckUserI

Re: [Rd] Feature request: Limiting output of installed.packages()

2023-04-19 Thread Sokol Serguei via R-devel
Le 19/04/2023 à 16:04, Chris Woelkers - NOAA Federal via R-devel a écrit : I'm going to ask this here before submitting it to Bugzilla. Is this a good idea and worthy of being considered? I think it is but others may not feel the same. The installed.packages() function is very useful but can be m

Re: [Rd] plogis (and other p* functions), vectorized lower.tail

2021-12-09 Thread Sokol Serguei
On 09/12/2021 16:55, Ben Bolker wrote: On 12/9/21 10:03 AM, Martin Maechler wrote: Matthias Gondan on Wed, 8 Dec 2021 19:37:09 +0100 writes: > Dear R developers, > I have seen that plogis silently ignores vector elements of lower.tail, and also of 'log'. This is indeed the

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-07 Thread Sokol Serguei
Le 07/06/2021 à 09:00, Dario Strbenac a écrit : Good day, I notice that summing rows of a large dgTMatrix fails. library(Matrix) aMatrix <- new("dgTMatrix", i = as.integer(sample(20, 1)-1), j = as.integer(sample(5, 1)-1), x = rnorm(1), Dim =

Re: [Rd] Unexpected behavior of '[' in an apply instruction

2021-02-12 Thread Sokol Serguei
Le 12/02/2021 à 23:49, Sokol Serguei a écrit : Le 12/02/2021 à 22:23, Rui Barradas a écrit : Hello, Yes, although there is an accepted solution, I believe you should post this solution there. It's a base R solution, what the question asks for. And thanks, I would have never reminded m

Re: [Rd] Unexpected behavior of '[' in an apply instruction

2021-02-12 Thread Sokol Serguei
Le 12/02/2021 à 22:23, Rui Barradas a écrit : Hello, Yes, although there is an accepted solution, I believe you should post this solution there. It's a base R solution, what the question asks for. And thanks, I would have never reminded myself of slice.index. There is another approach -- pr

Re: [Rd] Possible documentation problem/bug?

2020-04-30 Thread Sokol Serguei
Le 30/04/2020 à 14:31, Dominic Littlewood a écrit : It seems like there is no obvious way in the documentation to convert the expressions in the dots argument to a list without evaluating them. Say, if you want to have a function that prints all its arguments: If you wish to iterate through all

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

2020-04-20 Thread Sokol Serguei
nd side. Here x is the implied argument to the function because it is a free variable. We did not have use the name x. Any name could be used. It is the fact that it is a free variable, not its name, that matters. fn$sapply(split(mtcars, mtcars$cyl), ~ sum(dim(x))) 4 6 8 22 18 25 On Fri, Apr 17,

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

2020-04-17 Thread Sokol Serguei
ing for long variable names with the justification that IDEs do all the work anyway], but as I said, my argument was against the actual proposal, not general ideas about syntax improvement. Cheers, Simon On 17/04/2020, at 3:53 AM, Sokol Serguei wrote: Simon, Thanks for replying. In what follows I won&#x

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

2020-04-16 Thread Sokol Serguei
$r.squared) Seems like using this package is probably an easier solution for this wish than adding a reserved variable and adding additional syntax to the apply family as a whole. Thanks, -Mike From: Sokol Serguei Date: Thu, Apr 16, 2020 at 12:03 PM Subject: Re: [Rd] suggestion: "." in [lsv

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

2020-04-16 Thread Sokol Serguei
: paste(., \":\", deparse(s))" > > [[2]] > [1] "2 : paste(., \":\", deparse(s))" "3 : paste(., \":\", deparse(s))" > > Bill Dunlap > TIBCO Software > wdunlap tibco.com <http://tibco.com> > > > On Thu, Apr 16,

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

2020-04-16 Thread Sokol Serguei
Simon, Thanks for replying. In what follows I won't try to argue (I understood that you find this a bad idea) but I would like to make clearer some of your point for me (and may be for others). Le 16/04/2020 à 16:48, Simon Urbanek a écrit : Serguei, On 17/04/2020, at 2:24 AM, Sokol Se

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

2020-04-16 Thread Sokol Serguei
Hi, I would like to make a suggestion for a small syntactic modification of FUN argument in the family of functions [lsv]apply(). The idea is to allow one-liner expressions without typing "function(item) {...}" to surround them. The argument to the anonymous function is simply referred as "."

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-06 Thread Sokol Serguei
Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I propose the following patch against the current R-devel/src/main/connection.c (cf. attached file). It gives (on my linux box): > fc=file("/dev/full", "w") > write.csv("a", file=fc) Erro