Hi, I am trying to create a time series looking at the change in daily streamflow, but am having trouble with zeros in the time series . Each time series point is the change in streamflow (i.e., streamflow from today minus streamflow from yesterday), so when the streamflow from today equals the streamflow from yesterday the change in daily streamflow creates a value of zero. I uploaded the streamflow timeseries into R and currently have the following code:
full.dat <- read.csv("full.csv") # reads in the data
changeFull.ts <- ts(log10(full.dat$DailyChange)) # create a log-transformed time series for daily change in streamflow
When I run the code for changeFull.ts, I receive the warning message "Error in is.data.frame(data) : NaNs produced". I assume that this is due to dates where streamflow is unchanged resulting in a null value.
I then tried using the na.omit() command to remove the null data using the code:
changeRevFull.ts <- ts(na.omit(fullZerosRem.dat$DailyChange))
However, I still receive the warning message "Error in is.data.frame(data) : NaNs produced"
Does anyone have any ideas on how to proceed with creating a time series that is able to include zero values without receiving a warning message? TIA.