Re: [Rd] R 4.0.2 64-bit Windows hangs

2020-08-26 Thread Tomas Kalibera
On 8/25/20 6:14 PM, Tomas Kalibera wrote: On 8/22/20 9:33 PM, Jeroen Ooms wrote: On Sat, Aug 22, 2020 at 9:10 PM Tomas Kalibera wrote: On 8/22/20 8:26 PM, Tomas Kalibera wrote: On 8/22/20 7:58 PM, Jeroen Ooms wrote: On Sat, Aug 22, 2020 at 8:39 AM Tomas Kalibera wrote: On 8/21/20 11:45 PM,

Re: [Rd] trace creates object in base namespace if called on function argument

2020-08-26 Thread Tomas Kalibera
Hi Antoine, ok, I thought you were reporting that > foo <- function() "hello" > trace2 <- function(fun) trace(fun, quote(print("!!!"))) > trace2(foo) > base::fun in error did not trace "foo" in the top-level environment. This is, however, expected, because "trace" is called with argument fu

Re: [Rd] trace creates object in base namespace if called on function argument

2020-08-26 Thread Antoine Fabri
Hi Tomas, The doc indeed describes `what` as "the name, possibly quote()d, of a function to be traced or untraced". This is a good argument not to change the function and make it behave more like debug. However the doc also tells us "A call to trace allows you to insert debugging code (e.g., a ca

Re: [Rd] NAs and rle

2020-08-26 Thread William Dunlap via R-devel
Splus's rle() also grouped NA's (separately from NaN's): % Splus TIBCO Software Inc. Confidential Information Copyright (c) 1988-2008 TIBCO Software Inc. ALL RIGHTS RESERVED. TIBCO Spotfire S+ Version 8.1.1 for Linux 2.6.9-34.EL, 32-bit : 2008 > dput(rle(c(11,11,NA,NA,NA,NaN,14,14,14,14))) list("l

Re: [Rd] trace creates object in base namespace if called on function argument

2020-08-26 Thread Tomas Kalibera
Please note that this is documented in ?trace. "fun" is matched to what, it is a _name_ of the function to be traced, which is traced in the top-level environment. I don't know why it was designed this way, but it is documented in detail, and hence the expected behavior. Debugging is often, an