I need to exclude empty df rows from a 30-year time series, with three daily measurements for each variable. I already used the subset(x, ...)
function that solves part of the problem. However, in some cases there is no recorded measurement, as noted in the "prec" column for the date "1961-08-21". In this case, I need to keep a line stating that no measurement was performed that day, that is, that I remain with NA. How can I do this?
date id prec tair tw tmax tmin
1961-08-21 83377 NA 22.6 14.1 27.9 NA
1961-08-21 83377 NA 23.8 15.2 NA 13.8
1961-08-21 83377 NA 24.2 15.4 NA NA
1961-08-22 83377 NA 22.6 14.1 29.7 NA
1961-08-22 83377 0 24.8 14.6 NA 13.9
1961-08-22 83377 NA 27 16 NA NA
1961-08-23 83377 NA 24.6 14 28.8 NA
1961-08-23 83377 1 19.8 14.6 NA 13.8
1961-08-23 83377 2 18.8 14.7 NA 13.6