ggmice icon indicating copy to clipboard operation
ggmice copied to clipboard

Improve `verify_data` function

Open pepijnvink opened this issue 1 year ago • 4 comments

Automatically parse allowed data types rather than manual specification. Additional checks if data are of type matrix are left in. Should resolve #85

pepijnvink avatar Dec 18 '23 15:12 pepijnvink

I believe that a better solution would be https://rlang.r-lib.org/reference/arg_match.html

hanneoberman avatar Dec 20 '23 14:12 hanneoberman

Maybe using tryCatch could work:

  • check if argument input is of type data.frame,
  • if not, catch error and check if argument input is of type mids,
  • if then not, throw error

https://adv-r.hadley.nz/conditions.html#handling-conditions

hanneoberman avatar Dec 20 '23 14:12 hanneoberman

Should also resolve #130

pepijnvink avatar Feb 20 '24 17:02 pepijnvink