Hi David,
is this with version 2.0.3 or the newer github version(2.1)? It might help if you share str(Sample.stns) and the exact error messages and warnings you receive. I am confused by the Error: warning you report.
For example, the warning regarding dates in the future. It is supposed to be a warning, not an error. Can you please confirm that's the case?
The condition that is checked is this:
if(any(CTtable[,retrievalCol] > Sys.Date()))
So the warning is only raised if any entry in retrievalCol is later than the current system date. Given the number of stations you're combining maybe the formatting is inconsistent and some are misinterpreted?
You can check that with the function camtrapR:::parseDateObject(). This is how it is used inside cameraOperation:
parseDateObject(inputColumn = CTtable[,retrievalCol], dateFormat = dateFormat, checkNA = TRUE, checkEmpty = TRUE)
You can then check the range of the dates or plot them to identify problems.
Regarding the last question (problem_to greater than retrieval): there is a dedicated error message for that "Problem ends after retrieval". And the error should only occur when retrieval is smaller than the problem end:
if(any(CTtable[,retrievalCol] < CTtable[,cols.prob.to.index], na.rm = TRUE)) { # the error occurs}
And overall you're right, it would be better if camtrapR just natively supported POSIX columns. There are some problems with that in the current CRAN release that were fixed on github. So if you haven't yet please try the github version also.
Last question. You said:
"Previously, the warning provided me with just two offending records. It took several goes to fix all of the offending records.
Why do you only report two records, not all the offending records?"
-> does that refer to this warning: "retrieval date is in the future. If this is not intended please check dateFormat""? The warning does currently not provide any details (details about the entries that causes the problem), so I suppose you are referring to some other problem? If possible please let me know the exact warning / error message and I'll check.
Thank you and best regards,
Jürgen