that those dates have peak_cd with "B" (Month or Day of occurrence is unknown or not exact)
So what would be ideal? Grab the data, put NA's for the date's if peak_cd contains "B"? We know the year, so that's more than NA. But R doesn't let you do as.Date("2005"). POSIXct seems to also force it to a specific date too:
Well, ideally we would like to keep the year information but leave the month and day blank. But since that isn't an option in R, second choice would be to force a nonsense date like December 32. If that's not possible (which I'm guessing it won't be) the 3rd choice would be to force an unlikely date that is consistent and that we would recognize for all these instances, like January 1.
But these are instantaneous values. There is no start or end date. Annual peak, happens once per year.
However for this particular analysis that I'm doing, the peaks that have unknown months and days won't be useful anyway, I can leave those data points out for the purpose of this analysis.
I'm fixing some things on dataRetrieval today. Is this a lingering issue? Does dataRetrieval do what you what considering what NWIS gives out? (ie, can I close?)
Not sure, my reaction is no. That function shouldn't error out with data that we now know those dates can be expected from NWIS. Maybe it would be better if those yyyy-00-00 were removed and a warning thrown?
My vote would be always keep date, just toss warning if any match the "[0-9]*-00-00" using grepl and drop those values. Most people will probably just want well-formatted data. Those die-hards can write their own parser for 00-00 dates if they want 'em.