Fix timeseries.r