This should get you started:
#some data
x <- rlnorm(100, mean=1:4)
DF <- data.frame(x=x, g=c("a", "b", "c", "d"), stringsAsFactors=FALSE)
#pairwise Mann-Whitney-U-test
pairwise.wilcox.test(DF$x, DF$g, p.adjust.method = "bonferroni")
# Pairwise comparisons using Wilcoxon rank sum test
#
#data: DF$x and DF$g
#
# a b c
#b 0.0016 - -
#c 6.3e-09 0.0020 -
#d 1.9e-13 2.0e-08 0.1823
#
#P value adjustment method: bonferroni