Collection of various useful functions for R.