powered by
Runs test for randomness
runs.test( y, plot.it = FALSE, alternative = c("two.sided", "positive.correlated", "negative.correlated") )
A vector
A logical. whether or not draw a plot
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".
A list with class "htest" containing the following components: statistic,p-value,method and data.name
# NOT RUN { y=c(1,2,2,1,1,2,1,2) runs.test(y) y=c("A","B","B","A","A","B","A","B") runs.test(y,alternative="p") # }
Run the code above in your browser using DataLab