library of generic reusable R functions