On Thu, Apr 7, 2011 at 6:11 PM, Worik R wrote:
> Given a vector:
>
>> S <- c(1,1,0,0,1,1,-1,-1,-1,0,1)
>
> Then I expected lag(S) to give...
>
> c(1,0,0,1,1,-1,-1,-1,0,1)
>
> but instead...
>
>> S
> [1] 1 1 0 0 1 1 -1 -1 -1 0 1
>> lag(S)
> [1] 1 1 0 0 1 1 -1 -1 -1 0 1
> attr(,"ts
Given a vector:
> S <- c(1,1,0,0,1,1,-1,-1,-1,0,1)
Then I expected lag(S) to give...
c(1,0,0,1,1,-1,-1,-1,0,1)
but instead...
> S
[1] 1 1 0 0 1 1 -1 -1 -1 0 1
> lag(S)
[1] 1 1 0 0 1 1 -1 -1 -1 0 1
attr(,"tsp")
[1] 0 10 1
>
This is very odd. What is happening?
I get what
2 matches
Mail list logo