runs.test {webr} | R Documentation |
Runs test for randomness
runs.test(
y,
plot.it = FALSE,
alternative = c("two.sided", "positive.correlated", "negative.correlated")
)
y |
A vector |
plot.it |
A logical. whether or not draw a plot |
alternative |
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
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")