updates to R infrastructure, including setting global helpful functions that can be called from R