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

Fixing "color" inconsistency ("ggrepel") and error for nodes=2 #20

Merged
merged 11 commits into from Jun 29, 2019
Merged

Fixing "color" inconsistency ("ggrepel") and error for nodes=2 #20

merged 11 commits into from Jun 29, 2019

Conversation

mcanouil
Copy link
Contributor

@mcanouil mcanouil commented Mar 28, 2017

Since both ggplot2 and ggrepel use "colour", a warning occures when using "segment.color".

Fixing an issue in fortify.network for nodes=2, in which case, the matrix/data.frame structure was dropped. Issue solved by using "drop" argument.

Fixing issue in fortify.network when no edges.

Mickaël Canouil added 9 commits March 28, 2017 10:53
Change "color" to "colour" to be consistent with "grepel" and ggplot2 and avoid a warning for "segment.color"
Change "color" to "colour" to be consistent with "ggrepel" and ggplot2 and avoid a warning for "segment.color"
In the default function parameter "x" doesn't exist yet, it is replaced with "model".

When the number of nodes is two, the condition "(nrow(edges[, 1:2]) > nrow(unique(edges[, 1:2])))" cannot be assessed. This is fixed using "drop" argument in data.frame/matrix extractor.
Change "color" to "colour" to be consistent with "ggrepel" and ggplot2 and avoid a warning for "segment.color"
Change "color" to "colour" to be consistent with "ggrepel" and ggplot2 and avoid a warning for "segment.color"
Change "color" to "colour" to be consistent with "ggrepel" and ggplot2 and to avoid a warning for "segment.color"
Change "color" to "colour" to be consistent with "ggrepel" and ggplot2 and to avoid a warning for "segment.color"
Change "color" to "colour" to be consistent with "ggrepel" and ggplot2 and to avoid a warning for "segment.color"
Change "color" to "colour" to be consistent with "ggrepel" and ggplot2 and to avoid a warning for "segment.color"
Bad editing the first time.
@briatte briatte added this to the v0.5.6 – CRAN update milestone Jun 27, 2019
@briatte briatte merged commit c1d9ad1 into briatte:master Jun 29, 2019
@briatte
Copy link
Owner

briatte commented Jun 29, 2019

Hi @mcanouil

All apologies for letting your PR unanswered for so long – merged, thanks very much!

Same apologies to @trinker for the same reasons — I'll close PR #18 as the one above indeed includes it.

@@ -199,7 +199,6 @@ fortify.network <- function(model, data = NULL,
# add missing columns to nodes data
nodes$xend = nodes$x
nodes$yend = nodes$y
names(nodes) = names(edges)[1:ncol(nodes)]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcanouil This line is the only one that I did not get straight away in your PR. No idea why it's not needed any more, I'll just trust you on that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I recall properly, it was something about the fact that nodes cannot have more columns than the number of edges (but it's been a while and a lot of the packages on which ggnetwork relies on have changed).

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

Successfully merging this pull request may close these issues.

None yet

2 participants