Closed ethanbsmith closed 1 year ago
I'd appreciate it if you could do some testing on this commit. Thanks for the report!
> runSD(c(NA, 1:10), n = 1, cumulative = T)
[1] NA NaN 0.7071068 1.0000000 1.2909944 1.5811388 1.8708287 2.1602469 2.4494897 2.7386128 3.0276504
runSD(c(NA, 1:10), n = 1, cumulative = F)
[1] NA NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
produces NaN s in the ouput vs NA. i dont think this is wrong, but getting both NA and NaN seems a bit odd. other than this edge case, its producing the same output as my workaround.
Thanks for the feedback! I got the first one fixed (cumulative = TRUE). The other one existed in at least one version prior, but I don't like it... so I'm going to make that all NA also.
Description
runSD
returns allNA
when input has leadingNA
andcumulative
isTRUE
also identified as a regression issue vs. TTR_0.23-4 https://stackoverflow.com/questions/65431269/ttr-runsd-returns-all-na
Expected behavior
expect leading
NA
to be ignored, like w/ cumulative = FALSEMinimal, reproducible example
Session Info