add function to test whether a dataset is a time series