Can I please get help? Error says there is a problem with the mutate() function.

> hospital %>%
+   mutate(Admission.Month = floor_date(`Admission Date`, "Month")) %>%
+   count(Admission.Month)
Error in `mutate()`:
ā„¹ In argument: `Admission.Month = floor_date(`Admission Date`,
  "Month")`.
Caused by error in `validate_rounding_nunit()`:
! Invalid unit specification 'Month' (at onth)
Run `rlang::last_trace()` to see where the error occurred.
1 Like

Try making the floor_date unit lowercase: "month".

1 Like

Thanks Eric, it worked. Most grateful.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.