Learn R Programming

tipitaka (version 1.0.0)

pali_sort: Sorting function for vectors of Pali words.

Description

Note that all Pali string comparisons are case-insensitive. This algorithm is based on Quicksort, but creates lots of intermediate data structures instead of doing swaps in place. This has been implemented in C++ as the original R version was about 500x slower.

Usage

pali_sort(word_list)

Value

A new vector of Pali words in Pali alphabetical order

Arguments

word_list

A vector of Pali words

Examples

Run this code
# \donttest{
# A sorted list of 100 random words from the Tipitaka:
pali_sort(sample(tipitaka_long$word, 100))
# }

Run the code above in your browser using DataLab