This will perform a permutation test by creating 100 randomizations of data1 and testing their overlap with data2. Finally, plot(pt) will create a plot with the distribution of the permuted region sets and your original one. By default it assumes that you are working with the human genome and it will use a default mask (centromeres, etc...), but you can change that with the genome and mask parameters.
overlapPermTest is a convenience function to evaluate the overlap between two sets of regions, but regioneR includes other evaluation functions (distance between regions, for example) and different randomization strategies so it is possible to adapt it to your specific needs.
We'll be glad to help if there is any question on how to use it :)
Originally I suggested the wilcox.test, but I now see that your problem is more complex than a two sets of numbers.
It doesn't seem to me that you have spelled out the nature of the data or the hypothesis you wish to test in enough detail for a meaningful solution to be proposed.