The R package pocketknife
contains a variety of useful utility functions.
You can install the stable version on CRAN:
install.packages('pocketknife', dependencies=TRUE)
If you prefer to download the latest version, instead run the following after installing devtools:
devtools::install_github('ramhiser/pocketknife')