I'm sorry to bother this list so much
But I haven't programmed in
A while and I'm struggling.
 
I have a vector in R of 1's and -1's
And I want to use a streak of size Y
To predict that the same value will
Be next.
 
So, suppose Y = 3. Then,  if there is a streak of three 
ones in a row, then I will predict that the next value is
a 1. But, if there is a streak of 3 -1's in a row,
then I will predict that a -1 is next. Otherwise,
I don't predict anything.
 
I am really new to R and kind of struggling
And I was wondering if someone could show
how to do this ?
 
In other words, given a vector of -1's
And 1's,  I am unable ( I've been trying
For 2 days ) to create a new vector that
Has the predictions in it at the appropriate
places ? Thanks.
 
 


**********************************************************************
This email and any files transmitted with it are confidentia...{{dropped}}


