Various personal user-defined functions written in R.