-
Notifications
You must be signed in to change notification settings - Fork 25
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
Document how to check igraphs #216
Comments
The check_expr(., 'as_data_frame(g, "vertices")') %>%
check_result() %>%
check_equal(incorrect_msg = 'Did you use `actors` for the graph vertices?') probably isn't needed. If |
Thanks for the extensive code example! |
Yes, I think |
Oh, one thing to watch out for: |
igraph
s are annoying to check, since they contain weakrefs (pointers to memory addresses of external objects), which are unique each time they are created. That means thatcheck_equal()
doesn't work.Typically, the exercise will ask the student to create a graph from a data frame. This code is taken from
?graph_from_data_frame
.After some experimentation, this is the best set of SCTs I can come up with.
Long term, it would be nice to have
check_igraph()
that wraps this functionality. In the short term, having an example like this in the docs would be helpful.The text was updated successfully, but these errors were encountered: