A collection of miscellaneous R functions