Skip to content
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

check_arg("formula") does not flag incorrect formulas for models that are S4 objects #222

Open
amy-datacamp opened this issue Jan 3, 2019 · 0 comments

Comments

@amy-datacamp
Copy link

In Longitudinal Analysis in R, in exercises with models that are S4 objects, check_arg("formula") does not flag incorrect formulas and the SCT passes with an incorrect entry.

Here is an example from Chapter 4. The following SCT does not highlight mistakes in the formula.

ex() %>% check_correct(
 check_object(., "uncond_ri") %>% check_equal(), 
 check_function(., "glmer") %>% {
   check_arg(., "formula") %>% check_equal(eval = FALSE) 
   check_arg(., "data") %>% check_equal(eval = FALSE)
   check_arg(., "family") %>% check_equal(eval = FALSE)
 } 
)

The following code needs to be included to flag incorrect formula entries:

ex() %>% check_expr("uncond_ri@call$formula") %>% check_result() %>% check_equal(incorrect_msg = "Did you correctly define `uncond_ri`?", append = FALSE)

cc: @sumedh10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant