changed referencing of date columns from $ and [,"name"] to [[name]] to try and improve compatability with dplyr.
modified baseflow functions to recieve a dataframe rather than a vector as input, therefore improving compatability with dplyr's 'do' function.