You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm confused by what na.rm = TRUE is supposed to do in roll_median:
library(RcppRoll)
x <- 1:20
x[3:4] <- NA
x
roll_medianr(x = x,n = 5,na.rm = TRUE)
[1] NA NA NA NA 2 2 NA NA 7 8 9 10 11 12 13 14 15 16 17 18
roll_maxr(x = x,n = 5,na.rm = TRUE)
[1] NA NA NA NA 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Why is the median in position 6 equal to 2 rather than 3.5? Why are there NAs positions 7 and 8?
Am I missing something obvious or is this a bug?
The text was updated successfully, but these errors were encountered:
I'm confused by what
na.rm = TRUE
is supposed to do inroll_median
:Why is the median in position 6 equal to 2 rather than 3.5? Why are there NAs positions 7 and 8?
Am I missing something obvious or is this a bug?
The text was updated successfully, but these errors were encountered: