Functions to deepen my understanding of R