DevOps: migrate graph dependencies to igraph#36
Merged
Conversation
migrate implementation of network_g2g() to igraph
A data.table implementation of the original widyr::pairwise_count() function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch migrates graph dependencies to igraph away from network to reduce package dependence risk, load time, and maintenance complexity.
The dstr package was used to help determine which dependencies would have greater 'impact' as the result of being removed.
Changes
The changes made in this PR are:
network_g2g()andnetwork_p2p()to an igraph implementation.pairwise_count()that replaces the previouswidyr::pairwise_count()used intm_cooc().Check
Changes in argument
For
network_p2p()- old implementation:New implementation:
There are some changes to the range of node placement algorithms, which is now more dependent on
igraphrather thansna. See https://rdrr.io/cran/ggraph/man/layout_tbl_graph_igraph.html for algorithm options.Only the
...argument is removed fornetwork_g2g(). For both functions, anigraphgraph object is now returned instead of anetworkobject.Visual contrast
Using

network::network()andGGally::ggnet2():Using new igraph implementation:

Note
This addresses the load time issue referenced in #16.