Closed siims-biz closed 4 years ago
Package TTR version 0.23-1
If I do SMA with n=1 then the first number gets replaced with NA Sample
kurs [1] 1 2 3 4 > sma1 <- SMA(kurs,n=1) > sma1 [1] NA 2 3 4
Expected result 1 2 3 4
> kurs <- ts(kurs) > kurs Time Series: Start = 1 End = 4 Frequency = 1 [1] 1 2 3 4 > sma1 <- SMA(kurs,n=1) > sma1 Time Series: Start = 1 End = 4 Frequency = 1 [1] NA 2 3 4
This was fixed in 1daafa9fd5c15b12f1c11976b9acaa864b670348, which was released as part of version 0.23-5.
Package TTR version 0.23-1
If I do SMA with n=1 then the first number gets replaced with NA Sample
Expected result 1 2 3 4