############################################# ############################################# ### ### Section 3.4 and 3.5 examples ### ############################################# ############################################# ## Section 3.4 examples: # Sign test in R: # Example 1 (with raw paired data) scores.with.food <- c(74,71,82,77,72,81) scores.without.food <- c(68,71,86,70,67,80) # We can perform the sign test with the sign.test function: sign.test<-function(x=0,y=NULL,alternative="two.sided"){ n<-sum((x-y)!=0) T<-sum(x