I need to calculate (in R) the number of positive and negative runs in a vector. For example, suppose I have a vector I need to calculate (in R) the number of positi
I need to calculate (in R) the number of positive and negative runs in a vector. For example, suppose I have a vector I need to calculate (in R) the number of positi