New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninformative error when type is NULL in `generate()` #157

echasnovski opened this Issue Jul 24, 2018 · 2 comments


None yet
2 participants
Copy link

echasnovski commented Jul 24, 2018

As of e756b67 this happens if supply type = NULL in generate():


mtcars %>%
  dplyr::mutate(am = factor(am), vs = factor(vs)) %>%
  specify(am ~ vs, success = "1") %>%
  hypothesize(null = "independence") %>%
  generate(reps = 100, type = NULL)
#> Error in if (auto_type != type) stop(paste0("You have specified `type = \"", : аргумент нулевой длины

Probably, there should be informative error message like "type shouldn't be NULL.".

I'll fix this after the upcoming PR for #155 is merged.


This comment has been minimized.

Copy link

ismayc commented Jul 24, 2018

We might want to start using call. = FALSE with warning() and stop() or their {glue} equivalents in all (or nearly all) of these situations as well since auto_type doesn't mean anything to the outside user.


This comment has been minimized.

Copy link
Collaborator Author

echasnovski commented Jul 24, 2018

This will be addressed in PR for #155. I ended up replacing all stop(), warning(), and message() with stop_glue(), warning_glue(), and message_glue() in which call. = FALSE is default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment