Nothing
## It counts the number of inversions of a permutation.
inversions <- function(x){
n <- length(x)
k <- 0
for (i in 1:(n-1))
for (j in i+1:n)
if(isTRUE(x[i]>x[j])==TRUE) k <- k+1
else k <- k
return(k)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.