[R] Proba( Ut+2=1 / ((Ut+1==1) && (Ut==1))) ?
BEN at SSANET.COM
Mon Apr 25 21:22:03 CEST 2005
These two expressions might be what you are looking for --
sum (3 ==
sum (-3 ==
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of vincent
Sent: Monday, April 25, 2005 11:03 AM
To: r-help at stat.math.ethz.ch
Subject: [R] Proba( Ut+2=1 / ((Ut+1==1) && (Ut==1))) ?
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 also to the R creators/contributors, this soft
seems really great !)
R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide!
More information about the R-help