This is on Rstudio. I understand the usual meaning of "Origin must be supplied" errors and can fix it. But this one is a bit tricky.
Received ~500 lines of R code from somebody who left. I aligned the input CSV according to her spec, verified with her testing CSV file using str(). Everything runs fine, until this line
steps[is.na(step3)] <- 0
The error says " in as.date.numeric(value) " ‘Origin' must be supplied'
Steps now consists of num, int, char, Factor... BUT only one Date, named p-day. I am assuming the error is about this lone Date field? Also: <0 is making R implicitly converting the Date field to numeric before imputing NA to 0? Thanks