Error in date[range] : object of type ‘closure’ is not subsettable I have the below dataset and try to subset the data into 4 different periods and plot.