[R] Proba( Ut+2=1 / ((Ut+1==1) && (Ut==1))) ?
vincent
vincent at 7d4.com
Mon Apr 25 18:03:15 CEST 2005
Dear all,
First I apologize if my question is quite simple,
but i'm very newbie with R.
I have vectors of the form v = c(1,1,-1,-1,-1,1,1,1,1,-1,1)
(longer than this one of course).
The elements are only +1 or -1.
I would like to calculate :
- the frequencies of -1 occurences after 2 consecutives -1
- the frequencies of +1 occurences after 2 consecutives +1
It looks probably something like :
Proba( Ut+2=1 / ((Ut+1==1) && (Ut==1)))
could someone please give me a little hint about how
i should/could begin to proceed ?
Thanks
(Thanks also to the R creators/contributors, this soft
seems really great !)
More information about the R-help
mailing list