DHWI: R Code Functions File