aae-stats / aae.data

Methods to perform QA/QC on AAE data
Other
1 stars 0 forks source link

Mutate error possibly due to survey date format #14

Closed adriankitch closed 8 months ago

adriankitch commented 9 months ago

I've had a mutate error come up.

Error in mutate(): ℹ In argument: tmp_date = parse_my_date(...). Caused by error in UseMethod(): ! no applicable method for 'pull' applied to an object of class "c('double', 'numeric')" Run rlang::last_trace() to see where the error occurred.

This could be due to the new surveys now outputing dates with time, similar to a time stamp. I don't seem to have control over this as my date formatting excluding time in the survey form is ignored. No rush on this and I can supply data to test if needed.

jdyen commented 9 months ago

The datetime sounds like it will be the issue. Should be an easy fix, just need to add orders = c("dmy", "dmy_HMS") or similar to that parse call.

jdyen commented 9 months ago

Just checked and I'd already handled that issue (or should have). @adriankitch could you send me a test data set?

jdyen commented 8 months ago

Should be fixed here. It was a bug when using pull inside a mutate call (probably bad practice). We need to do this to handle variable field names but it meant that we double-called from within the same object and R gets confused.

adriankitch commented 8 months ago

Yep the bug is fixed.