Erika Mudrak's R functions for personal use