set.seed(1706)
response <- factor(c(sample(1:4,7,replace=TRUE),sample(3:6,7,replace=TRUE)),
levels=c("1","2","3","4","5","6"),ordered=TRUE)
# Comparison of 2 samples
fact <- gl(2,7,labels=LETTERS[1:2])
wilcox.rating.signtest(response~fact)
# Comparison to a given value
theo <- "4"
wilcox.rating.signtest(response,mu=theo)
Run the code above in your browser using DataLab