Quicksort algorithm in R to demonstrate recursion