Re: [Rd] sum() vs cumsum() implicit type coercion

2020-08-25 Thread Tomas Kalibera
On 8/23/20 5:02 PM, Rory Winston wrote: Hi I noticed a small inconsistency when using sum() vs cumsum() I have a char-based series > tryjpy$long [1] "0.0022" "-0.0002" "-0.0149" "-0.0023" "-0.0342" "-0.0245" "-0.0022" [8] "0.0003" "-0.0001" "-0.0004" "-0.0036" "-0.001" "-0.0011" "

Re: [Rd] sum() vs cumsum() implicit type coercion

2020-08-25 Thread Martin Maechler
> Tomas Kalibera > on Tue, 25 Aug 2020 09:29:05 +0200 writes: > On 8/23/20 5:02 PM, Rory Winston wrote: >> Hi >> >> I noticed a small inconsistency when using sum() vs cumsum() >> >> I have a char-based series >> >> > tryjpy$long >> >> [1] "

Re: [Rd] sum() vs cumsum() implicit type coercion

2020-08-25 Thread Hugh Parsonage
(If I may be so bold, although I think it's unlikely that a majority would be in favour of this change, and I doubt anyone is actually proposing it, I think quite a bit more than "a majority" should be required before a change like this should be allowed. Considering the feature that cumsum coerce

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

2020-08-25 Thread Tomas Kalibera
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, m19tdn+9alxwj7d2bmk--- via R-devel wrote:

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

2020-08-25 Thread Antoine Fabri
Dear R-devel, I don't think this is expected : foo <- function() "hello" trace2 <- function(fun) trace(fun, quote(print("!!!"))) base::fun # Object with tracing code, class "functionWithTrace" # Original definition: # function() "hello" # # ## (to see the tracing code, look at body(object)) `unt

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

2020-08-25 Thread Antoine Fabri
Apologies there is one line missing in my last email, the code should be : foo <- function() "hello" trace2 <- function(fun) trace(fun, quote(print("!!!"))) trace2(foo) # <- THIS LINE WAS MISSING base::fun Best, Antoine Le mar. 25 août 2020 à 22:02, Antoine Fabri a écrit : > Dear R-devel, > >

[Rd] NAs and rle

2020-08-25 Thread Gabriel Becker
Hi All, A twitter user, Mike fc (@coolbutuseless) mentioned today that he was surprised that repeated NAs weren't treated as a run by the rle function. Now I know why they are not. NAs represent values which could be the same or different from eachother if they were known, so from a purely concep