runs.test {webr} | R Documentation |
Runs test for randomness
Description
Runs test for randomness
Usage
runs.test(
y,
plot.it = FALSE,
alternative = c("two.sided", "positive.correlated", "negative.correlated")
)
Arguments
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". |
Value
A list with class "htest" containing the following components: statistic,p-value,method and data.name
Examples
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")
[Package webr version 0.1.5 Index]