R functions for medicare hospital data