Here is sample input/output:
x<-c(1,2,3,4,5,6,7,8,9,10)
y<-c(11,12,13,14,15)
library(exactRankTests)
wil<-wilcox.exact(x,y)
wil
Exact Wilcoxon rank sum test
data: x and y
W = 0, p-value = 0.000666
alternative hypothesis: true mu is not equal to 0
In this case W should be the sum of the ranks of y (coincidentally also the
values of the y data)= 11+12+13+14+15 = 65.
W of zero is ridiculous.
Similarly, in this case W should be 2+4+6+8 = 20, not 10 as reported.
x<-c(1,3,5,7,9)
y<-c(2,4,6,8)
wil<-wilcox.exact(x,y)
wil
Exact Wilcoxon rank sum test
data: x and y
W = 10, p-value = 1
alternative hypothesis: true mu is not equal to 0