Re: [Rd] Bug or feature?

2023-01-17 Thread Martin Maechler
> GILLIBERT, Andre > on Sat, 14 Jan 2023 16:05:31 + writes: > Dear developers, > I found an inconsistency in the predict.lm() function between offset and non-offset terms of the formula, but I am not sure whether that is intentional or a bug. > The problem can be s

Re: [Rd] memory leak in png()

2023-01-17 Thread Martin Maechler
> Edward Ionides > on Mon, 16 Jan 2023 09:04:49 -0500 writes: > Hi all, > Yesterday I discovered what seems to me like a memory leak in png() so I'm > reporting it in case that is helpful. Here is a small reproducible example: > R -d "valgrind --tool=memcheck --trac

Re: [Rd] memory leak in png()

2023-01-17 Thread Martin Maechler
Note that cairo_pdf() also suffers from the same leak .. as to be expected once you notice that much of the cairo device handling uses common code. ... .. and then, when you are aware that on Linux, the default interactive device is x11() and its default type is *also* "cairo" { possibly not on

Re: [Rd] memory leak in png()

2023-01-17 Thread Duncan Murdoch
I don't have a valgrind-capable version of R, but I'd be interested to see whether this is a one-time loss, or repeated. That is, do you get a much bigger loss from running the lossy code in a loop like this? for (i in 1:100) { png(filename='p.png'); plot(1:10); dev.off() } Duncan Murdoch

Re: [Rd] memory leak in png()

2023-01-17 Thread Tim Taylor
On 17/01/2023 13:06, Duncan Murdoch wrote: I don't have a valgrind-capable version of R, but I'd be interested to see whether this is a one-time loss, or repeated.  That is, do you get a much bigger loss from running the lossy code in a loop like this?  for (i in 1:100) { png(filename='p.png'

Re: [Rd] memory leak in png()

2023-01-17 Thread Martin Maechler
> Tim Taylor > on Tue, 17 Jan 2023 13:39:01 + writes: > On 17/01/2023 13:06, Duncan Murdoch wrote: >> I don't have a valgrind-capable version of R, but I'd be interested to >> see whether this is a one-time loss, or repeated.  That is, do you get a >> much bigger

Re: [Rd] Recycling in arithmetic operations involving zero-length vectors

2023-01-17 Thread peter dalgaard
Actually, sum(), all(), any(), prod() all return a _carefully considered_ result in the case of an empty vector. The sum over a disjoint union of sets should be the sum of the sums over each set, so if a set is empty, its contribution to the sum must be zero. Similarly, the product over an empty

[Rd] Problem installing gdb into Rtools42

2023-01-17 Thread Dominick Samperi
Hello, I tried installing gdb into Rtools42 following the instructions here https://cran.r-project.org/bin/windows/base/howto-R-4.2.html I ran 'pacman -Sy gdb', and the installation seemed to complete without problems. But gdb could not be started because incorrect DLL versions were installed, i

Re: [Rd] Problem installing gdb into Rtools42

2023-01-17 Thread Tomas Kalibera
On 1/18/23 04:33, Dominick Samperi wrote: Hello, I tried installing gdb into Rtools42 following the instructions here https://cran.r-project.org/bin/windows/base/howto-R-4.2.html I ran 'pacman -Sy gdb', and the installation seemed to complete without problems. But gdb could not be started be