I want to create a function that can calculate the U value of the function in R and calculates the p-value using exact distribution with 10000 replications . My R function
U<-function(x,y){
n1<-length(x)
n2<-length(y)
d<-n1+n2
}
But I do no know the procedure that will calculate the Mann Whitney U test.Here,x and y are two differen and independent sample.