Convenience functions for use in R.