A toolkit of useful functions for R.