Describe your issue
I am having trouble with adding date diff. for date of report to date onset
-# Make date-difference column %>%
mutate(diff = date_report - date_onset)
This is outcome when run:
Error in mutate()
:
In argument:
diff = date_report - date_onset
.
Caused by error in -.Date
:
! can only subtract from “Date” objects
Run rlang::last_trace()
to see where the error occurred.
Follow-up
- Thank the volunteers who try to help you
- Mark one reply as the “Solution” if appropriate