title: Kendall tau distance (a.k.a bubble-sort distance) between permutations in base R
body: <p>How can the Kendall tau distance (a.k.a. bubble-sort distance) between two permutations be calculated in R without loading additional libraries?</p>