Utility functions for building R packages