data <- matrix(scan(),ncol=3,byrow=TRUE) 1 1530 1290 2 2130 2250 3 2940 2430 4 1960 1900 5 2270 2120 data Diet1 <- data.frame(data) colnames(Diet1) <- c("id","Recall24","DietSurvey") rm(data) Diet1 # the Signed Rank test wilcox.test(Diet1$Recall24, Diet1$DietSurvey, paired = TRUE) # this is the second example from the SAS code differences <- c(-5, -3, -3, 0, 0, 2, 4, 4, 4, 5) # the Signed Rank test wilcox.test(differences) rm(Diet1,differences) # remove objects when finished