R convenience functions