reconhub / linelist

An R package to import, clean, and store case data
https://www.repidemicsconsortium.org/linelist
Other
25 stars 5 forks source link

check for entirely missing columns in guess_dates #109

Open zkamvar opened 4 years ago

zkamvar commented 4 years ago

This will return the column unchanged if encountered and will fix #108

zkamvar commented 4 years ago

@aspina7, can you check this with remotes::install_github("reconhub/linelist#109") and confirm that it works for you?

aspina7 commented 4 years ago

so it works for a character NA variable (returns only NAs). But i think the default for an entirely NA var is to be logical....

zkamvar commented 4 years ago

so it works for a character NA variable (returns only NAs). But i think the default for an entirely NA var is to be logical....

Okay, I've set it so that it will return the unmodified NA column before it panics about vector types. Try it now.

aspina7 commented 4 years ago

works a charm - maybe just specify in the warning which variable?

zkamvar commented 4 years ago

works a charm - maybe just specify in the warning which variable?

Again, difficult to do because the context of this function is on individual vectors. It doesn't know that these vectors come from a data frame.

aspina7 commented 4 years ago

ah true true sorry!