GithubHelp home page GithubHelp logo

briatte / ggnetwork Goto Github PK

View Code? Open in Web Editor NEW
145.0 8.0 28.0 93.13 MB

Geoms to plot networks with ggplot2

Home Page: https://briatte.github.io/ggnetwork/

R 1.43% HTML 98.57%
ggplot2 network-visualization r

ggnetwork's Introduction

ggnetwork

Lifecycle: maturing GitHub tag R-CMD-check AppVeyor Build Status Coverage Status (codecov) CRAN status CRAN checks (worst) CRAN total downloads

This package allows to pass network objects to ggplot2 and provides geometries to plot their elements.

Get started

You can install the released version of ggnetwork from CRAN with:

install.packages("ggnetwork")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("briatte/ggnetwork")

The ggnetwork package depends on R 3.5+ and on ggplot2 version 2.0.0+.

Documentation

For further examples that use ggnetwork with other packages to produce animated graphs, see James Curley’s slides on “Interactive and Dynamic Network Visualization in R” (2016). For even more options, see Katherine Ognyanova’s tutorial “Network visualization with R (2019), and David Schoch’s guide “Network Visualizations in R using ggraph and graphlayouts” (2019).

Getting help

If you encounter a clear bug, please file a minimal reproducible example on GitHub.

For questions and other discussion, please contact the package maintainer, or ask other users on Stack Overflow.

Citation

You can get a citation for the package from R:

citation("ggnetwork")

See also

The ggnetwork package was written within a larger development effort around network visualization with ggplot2, on which you can read the following article:

Sam Tyner, François Briatte and Heike Hofmann, “Network Visualization with ggplot2,” The R Journal 9(1): 27–59, 2017.

The article also covers the related packages geomnet and ggnet. It does not cover the more recent ggraph, graphlayouts and tidygraph, although you should turn to those if you need a highly extensive way to build and plot ‘tidy’ networks with ggplot2.

Thanks

Thanks to @achmurzy, @andrewd789, @ArtemSokolov, @aterhorst, @Edouard-Legoupil, @emillykkejensen, @EvanUp, @evinhas, @ferroao, @FinScience, @ghost, @instantkaffee, @jalapic, @jcfisher, @jfaganUK, @kippjohnson, @koheiw, @komalsrathi, @mbojan, @mcanouil, @mgagliol, @mhairi, @minimaxir, @mkarikom, @nick-youngblut, @pinguinjay, @SantiFilippo, @sciabolazza, @sctyner, @trinker, @zachcp and two anonymous R Journal reviewers. @heike and @ethen8181 also helped with the tricky issue of having arrows on directed edges, while @sumtxt inspired this package as well as its predecessor, the ggnet package, which also benefitted from discussions with @pedroj and Bertrand Sudre.


Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.

ggnetwork's People

Contributors

briatte avatar jcfisher avatar krlmlr avatar mbojan avatar trinker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ggnetwork's Issues

Can't pre-calculate the node locations

Using igraph, I calculated the x and y locations of the nodes first. I plan on making a series of charts, but for easy comparison I want make sure the nodes are in the same location each time I make a chart.

g13.r.lo <- layout_nicely(g13.r)
V(g13.r)$x <- g13.r.lo[,1]
V(g13.r)$y <- g13.r.lo[,2]

But when I use ggnetwork it returns an error:

> ggplot(g13.r, arrow.gap = 0.01, aes(x, y, xend = xend, yend = yend)) +
+   geom_edges(alpha = 0.3) +
+   geom_nodes(aes(color = legacy)) +
+   scale_color_discrete('Context') +
+   theme_blank()
Error in fix.by(by.x, x) : 'by' must specify uniquely valid columns

`intergraph` link in `R/ggnetwork.R`

The NOTE caused by intergraph package linked in the roxygen documentation:

* checking Rd cross-references ... NOTE
Package unavailable to check Rd xrefs: ‘intergraph’
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE
Status: 1 NOTE
See
  ‘/home/travis/build/briatte/ggnetwork/ggnetwork.Rcheck/00check.log’
for details.

Clean up tests

The tests are messily organised, and having two fortify. methods changes the logic of how they should be organised. See a286424 in particular.

Node-faceting

Hello,

I have multiple directed network objects (e.g. net1, net2, net3, ...) each with same number of nodes and node attributes. Only the edges are different (edges represent different relationships). The example provided in https://briatte.github.io/ggnetwork/#node-faceting appears to have only one network object. The output is exactly what I am after. I simply do not know how to deal with separate/multiple network objects. Please advise.

Support `igraph` layouts natively?

library(igraph)
library(ggnetwork)

n <- igraph::random.graph.game(10, 0.3)
E(n)$weight <- sample(c(1, 2), igraph::gsize(n), replace = TRUE)

# layout_*

self = self?

I can't plot any of the ggnetwork plots. I get the same error every time:

Error in f(..., self = self) : unused argument (TRUE)

Use personal/professional website in pkgdown website

Hi @briatte

would it be possible to change the current _pkgdown.yml file to add my website?
It will add a href link to my name in the authors list on the pkgdown website as for NACHO.

template:
  params:
    bootswatch: simplex

development:
  mode: auto

authors:
  Mickaël Canouil:
    href: http://mickael.canouil.fr

You can add your own website as well

template:
  params:
    bootswatch: simplex

development:
  mode: auto

authors:
  Mickaël Canouil:
    href: http://mickael.canouil.fr
  François Briatte:
    href: http://f.briatte.org/r

Thanks!

geom_edgetext() fails to display on perfectly horizontal edges (e.g., in bipartite graphs)

When an edge is perfectly horizontal, geom_edgetext() fails to display labels. Consider a simple graph:

G <- data.frame( x=0, xend=1, y=c(0,1), yend=c(0,1) )
ggplot( G, aes(x=x, y=y, xend=xend, yend=yend) ) +
    geom_edges() + theme_blank() +
    geom_edgetext( label="a" )           ## Fails to display

This is a potential problem for displaying bipartite graphs. The current workaround is to add a small amount of vertical perturbation to one of the ends:

G1 <- data.frame( x=0, xend=1, y=c(0,1), yend=c(0,1)+0.01 )
ggplot( G1, aes(x=x, y=y, xend=xend, yend=yend) ) +
    geom_edges() + theme_blank() +
    geom_edgetext( label="a" )          ## Now works as expected

Different code depending on fortify method?

The 'make nodes data of identical dimensions to edges data' code differs:

# make nodes data of identical dimensions to edges data
missing.cols <- names(edges)[which(!(names(edges) %in% names(nodes)))]
nodes[missing.cols] <- NA

# make nodes data of identical dimensions to edges data
for (y in names(edges)[(1 + ncol(nodes)):ncol(edges)]) {
nodes <- cbind(nodes, NA)
names(nodes)[ncol(nodes)] <- y
}

… and I have no idea why.

The code in fortify.network fails to pass tests if copy-pasted into fortify.igraph.

Position labels on curved edges in ggnetwork

I am using the r package ggnetwork to plot a weighted directed graph.

My goal is to plot a label indicating the weight of each edge. Since the network is directed, I use the field curvature in the function geom_edges() to avoid overlapping edges. Then, I use the function geom_edgetext() to plot the weight of each edge.

My problem is that I do not know how to provide the new coordinates of the edges (after the curvature has been set) to geom_edgetext().

As a result, labels are positioned as if edges weren't curved. Any idea?

Following a reproducible example showing where I got so far:

# Load libraries
library(igraph); library(ggplot2); library(ggnetwork)

# Create adjacency matrix
m <- matrix(c(c(0,1,0,0,1,0,0),
           c(1,0,1,1,0,0,0),
           c(0,1,0,1,0,0,0),
           c(0,1,1,0,0,0,0),
           c(1,0,0,0,0,1,1),
           c(0,0,0,0,1,0,1),
           c(0,0,0,0,0,1,0)), nrow = 7, ncol = 7, byrow=T)

# Assign weights: column-normalize m
D <- diag(1/c(apply(m,2,sum)))
m <- m%*%D

# Create igraph object
g <- graph_from_adjacency_matrix(adjmatrix = m, mode = "directed", weighted = TRUE)

# Create ggnetwork object
n <- ggnetwork(g, layout = "fruchtermanreingold", cell.jitter = 0.25)

# Plot graph with weights
ggplot(n, aes(x = x, y = y, xend = xend, yend = yend)) +
geom_edges(size = 0.3, color = "grey50", arrow = arrow(length = unit(6,"pt")), curvature = 0.2) +
geom_nodes(size = 8, color = "orange") +
geom_edgetext(aes(label =  round(weight,2)), color = "grey25")+
theme_blank()+ theme(legend.position="none")

Ineffective `weights` argument in `fortify.network`

Looking at PR #25 in detail, @jcfisher did not port the weights argument from fortify.network to fortify.igraph — with good reason, since the argument does nothing.

The argument is described as follows:

#' @param weights the name of an edge attribute to use as edge weights when
#' computing the network layout, if the layout supports such weights (see
#' 'Details').
#' Defaults to \code{NULL} (no edge weights).

And similar information is listed under 'Edge weights' in the vignette.

The problem is that there is no weight argument in sna::gplot.layout.kamadakawai, although its code calls the third column of the edge list at one point (line 754 below), with reference to an undocumented edge.val.as.str argument:

https://github.com/cran/sna/blob/38970cdcfee061c5ca237b885290738f24e0f3ef/R/visualization.R#L747-L758

It might thus well be that sna 'silently' weights the edge list in this case, although it is not very obvious (to me) how that happens, and whether users can provide sna::gplot.layout.kamadakawai (or similar layout algorithms that accept weighted edges) with a network object and expect edge weights to be taken in to account.

In all circumstances, contrary to what the documentation says, fortify.network does not currently take those edge weights into account. Edge weights are added to the edge list, but discarded right after that happens:

edges <- network::as.matrix.network.edgelist(model, attrname = weights)
# edge list (if there are duplicated rows)
if (
nrow(edges[, 1:2, drop = FALSE]) > nrow(unique(edges[, 1:2, drop = FALSE]))
) {
warning("duplicated edges detected")
}
edges <- data.frame(nodes[edges[, 1], 1:2], nodes[edges[, 2], 1:2])

For edge weights to be taken into account by fortify.network, (1) I need to understand better whether the code I highlighted from sna is indeed a weighting technique, and (2) I need to pass the weighted edge list to the layout calculation, i.e. I need to compute edges before computing the layout matrix, and use that (edges) in the layout computation.

Checking our R Journal article revealed that geomnet seems to have a solution to that issue:

https://github.com/sctyner/geomnet/blob/ca44ee77d59f6532b7ab29fcea8c724c5831f4c1/R/stat-net.r#L82-L109

Allow vertex/edge character attributes to be imported as such

Right now, and unless the stringsAsFactors option has been modified globally, ggnetwork automatically converts strings to factors when importing vertex and edge attributes:

> data(emon, package = "network")
> str(ggnetwork(emon[[1]]))
'data.frame':	97 obs. of  15 variables:
 $ x                  : num  0.0791 0 0.6149 0.0471 0.5285 ...
 $ y                  : num  0.5645 0.3514 0.3141 0.0463 1 ...
 $ Command.Rank.Score : num  0 10 3 5 0 0 20 40 10 30 ...
 $ Decision.Rank.Score: num  20 7 0 5 0 0 20 50 10 20 ...
 $ Formalization      : num  2 1 1 1 1 1 1 2 1 3 ...
 $ Location           : Factor w/ 1 level "L": 1 1 1 1 1 1 1 1 1 1 ...
 $ na.x               : logi  FALSE FALSE FALSE FALSE FALSE FALSE ...
 $ Paid.Staff         : num  10 400 200 60 1 7 60 7 70 100 ...
 $ Sponsorship        : Factor w/ 6 levels "City","County",..: 6 6 6 4 5 5 2 3 1 1 ...
 $ vertex.names       : Factor w/ 14 levels "A.1.Ambulance.Service",..: 12 14 13 4 9 10 8 5 2 3 ...
 $ Volunteer.Staff    : num  50 2000 0 0 20 80 20 100 0 0 ...
 $ xend               : num  0.0791 0 0.6149 0.0471 0.5285 ...
 $ yend               : num  0.5645 0.3514 0.3141 0.0463 1 ...
 $ Frequency          : num  NA NA NA NA NA NA NA NA NA NA ...
 $ na.y               : logi  NA NA NA NA NA NA ...

Let's keep that default behaviour, but allow the user to change it if need be.

The problem above is shown with fortify.network. It also affects fortify.igraph, which suffers from another issue on top of that one: see #54.

Unexpected loading and attaching sna

fortify.network unexpectedly loads and attaches the "sna" package even though "sna" is declared only as import. That might ruin your workspace because of several name conflicts.

IMHO load_pkg is a rather nasty hack with even nastier side effects ;) I think it is only needed once to call an appropriate layout algorithm from "sna".

I will submit a PR.

Extra dim/dimnames attributes in columns of fortify.network output

Hello,

at least in the CRAN version, the data.frame produced by fortify.network has "dim" and "dimnames" attributes set for columns x, y, xend, yend. This is an issue for dplyr::filter, which complains that the columns are not one-dimensional vectors. A simple turnaround that I use is to first call:
as.data.frame(lapply(X=df, FUN=as.vector))
on the output (here named df).

Given the increasing popularity of dplyr and other tidyverse packages, I was wondering if there is a compelling reason to keep these extra attributes in the output?

Thanks a lot for an otherwise excellent package!

Legends not appearing in ggnet2 plot along with wrong color for edges

I need to create a network plot where the color of nodes and edges will be dependent on a parameter. Though I have been able to render the graph, the color of edges are not reflecting properly and the legend is also not appearing.

Below is a reproducible code. Any help would be great.

library(network)
library(sna)
library(ggplot2)
library(ggnetwork)
library(sna)
library(GGally)

edge_df = data.frame("Start" = c(1,2,4,5), "End" = c(2,3,3,1), "strength" = 
                       c("uncovered","uncovered","covered","uncovered"))


vertex_df = data.frame("Nodes" = c(1,2,3,4,5), "strength" = 
                         c("covered","uncovered","uncovered",                                                                             
                           "uncovered","covered"))

net = network(edge_df[,1:2], directed = FALSE)


net %v% "nodes" = ifelse(vertex_df$strength == "covered", "Nodes Covered", 
                         "Nodes Uncovered")

net %v% "color_node" = ifelse(net %v% "nodes" == "Nodes Covered", 
                              "steelblue", "yellow")

net %e% "weight" = ifelse(edge_df$strength == "covered", "Edges Covered", 
                          "Edges Uncovered")

set.edge.attribute(net, "color", ifelse(net %e% "weight" == "Edges Covered", 
                                        "green", "red"))

set.seed(123)
ggnet2(net, color = "color_node",
       edge.color = "color", 
       edge.size = 0.5,
       node.size = 1,
       mode = "fruchtermanreingold",
       color.legend = c("timers","weight")) +
  theme(panel.background = element_rect(fill = "black"),
        text = element_text(color = "white"),
        legend.position = "bottom")

Interaction with ggiraph

Is there a way of adding interactivity such as nodes changing color or tooltip. I have made a limited tooltip to an example using ggiraph. Are there any other examples?

library(ggplot2)
library(rvg)
library(ggiraph)
library(network)
library(sna)
library(ggnetwork)

n <- network(rgraph(10, tprob = 0.2), directed = FALSE)
n %v% "family" <- sample(letters[1:3], 10, replace = TRUE)
n %v% "importance" <- sample(1:3, 10, replace = TRUE)
e <- network.edgecount(n)
set.edge.attribute(n, "type", sample(letters[24:26], e, replace = TRUE))
set.edge.attribute(n, "day", sample(1:3, e, replace = TRUE))

df<-ggnetwork(n, layout = "fruchtermanreingold", cell.jitter = 0.75)
#df$tooltip <- paste0("Node ID = ", df$vertex.names)
df$tooltip <- paste0("Betweenness = ", round(betweenness(n)[df$vertex.names],2))

gg_point_1 <- ggplot(df, aes(x = x, y = y, xend=xend, color=family, yend=yend, tooltip = tooltip) )  +
                     geom_edges(aes(linetype = type), color = "grey50") +
                     geom_nodes(color = "black", size = 8) +
                     theme_blank() +
                     geom_nodetext(aes(label = LETTERS[vertex.names]), fontface = "bold") + 
                     geom_point_interactive(size=5)



# htmlwidget call
ggiraph(code = {print(gg_point_1)}, width = 7, height = 6,  hover_css = "{fill:orange;r:6px;}") 

'Stat' not found if ggnetwork not loaded

Great package! Thanks for the work.

I want to use ggnetwork in a package meaning it is not loaded explicitly. When I try to use the functions I get the message:

Error in eval(expr, envir, enclos) : object 'Stat' not found

I can make everything work if I load ggplot2 interactively but that's not a real fix because the package doesn't load ggplot, just imports it and ggnetwork. I suspect you need to explicitly import Stat from ggplot2...something like importFrom ggplot2 layer GeomPoint Stat but this is unconfirmed

MWE

idat <- structure(list(x = structure(c(0.71018852180629, 0.8605306826431, 
0.924209068560679, 0.285775361017905, 0.664863156729071, 0.487145768921997, 
1, 0.832231634124478, 0.422308506307687, 0.762751881472008, 0.0938322873057752, 
0.0261833664908076, 0.298901171980893, 0.701456761564214, 0, 
0.165534692152668, 0.705929523042674, 0.47582084015162, 0.904864637947938, 
0.266173069467932, 0.0938322873057752, 0.285775361017905, 0.285775361017905, 
0.487145768921997, 0.487145768921997, 0.664863156729071, 0.664863156729071, 
0.71018852180629, 0.71018852180629, 0.71018852180629, 0.71018852180629, 
0.71018852180629, 0.71018852180629, 0.832231634124478, 0.8605306826431, 
0.8605306826431, 0.8605306826431, 0.8605306826431, 0.924209068560679, 
0.924209068560679, 1), .Dim = c(41L, 1L), .Dimnames = list(NULL, 
    NULL)), y = structure(c(0.334645431217957, 0.432671829817682, 
0.353342528130734, 0.140553264183392, 0.144474680809364, 0.199584374433029, 
0.510873652408072, 0.510678506104081, 0.0134895225339282, 0, 
0.78879924632742, 0.528252398565063, 0.272329523655057, 0.524789125711111, 
0.32914964854835, 0.67428118095733, 0.990339597882693, 1, 0.869509897438751, 
0.949736961865797, 0.78879924632742, 0.140553264183392, 0.140553264183392, 
0.199584374433029, 0.199584374433029, 0.144474680809364, 0.144474680809364, 
0.334645431217957, 0.334645431217957, 0.334645431217957, 0.334645431217957, 
0.334645431217957, 0.334645431217957, 0.510678506104081, 0.432671829817682, 
0.432671829817682, 0.432671829817682, 0.432671829817682, 0.353342528130734, 
0.353342528130734, 0.510873652408072), .Dim = c(41L, 1L), .Dimnames = list(
    NULL, NULL)), na.x = c(FALSE, FALSE, FALSE, FALSE, FALSE, 
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE
), vertex.names = structure(c(3L, 8L, 9L, 4L, 10L, 13L, 16L, 
14L, 6L, 18L, 20L, 5L, 12L, 1L, 7L, 2L, 19L, 17L, 11L, 15L, 20L, 
4L, 4L, 13L, 13L, 10L, 10L, 3L, 3L, 3L, 3L, 3L, 3L, 14L, 8L, 
8L, 8L, 8L, 9L, 9L, 16L), .Label = c("also", "four", "going", 
"governor", "jobs", "just", "know", "make", "people", "president", 
"right", "romney", "said", "sure", "think", "want", "well", "will", 
"world", "years"), class = "factor"), xend = structure(c(0.71018852180629, 
0.8605306826431, 0.924209068560679, 0.285775361017905, 0.664863156729071, 
0.487145768921997, 1, 0.832231634124478, 0.422308506307687, 0.762751881472008, 
0.0938322873057752, 0.0261833664908076, 0.298901171980893, 0.701456761564214, 
0, 0.165534692152668, 0.705929523042674, 0.47582084015162, 0.904864637947938, 
0.266173069467932, 0.165534692152668, 0.487145768921997, 0.298901171980893, 
0.298901171980893, 0.422308506307687, 0.487145768921997, 0.762751881472008, 
0.8605306826431, 0.924209068560679, 0.664863156729071, 0.487145768921997, 
0.832231634124478, 0.701456761564214, 0.701456761564214, 0.924209068560679, 
0.832231634124478, 1, 0.701456761564214, 1, 0.832231634124478, 
0.832231634124478), .Dim = c(41L, 1L), .Dimnames = list(NULL, 
    NULL)), yend = structure(c(0.334645431217957, 0.432671829817682, 
0.353342528130734, 0.140553264183392, 0.144474680809364, 0.199584374433029, 
0.510873652408072, 0.510678506104081, 0.0134895225339282, 0, 
0.78879924632742, 0.528252398565063, 0.272329523655057, 0.524789125711111, 
0.32914964854835, 0.67428118095733, 0.990339597882693, 1, 0.869509897438751, 
0.949736961865797, 0.67428118095733, 0.199584374433029, 0.272329523655057, 
0.272329523655057, 0.0134895225339282, 0.199584374433029, 0, 
0.432671829817682, 0.353342528130734, 0.144474680809364, 0.199584374433029, 
0.510678506104081, 0.524789125711111, 0.524789125711111, 0.353342528130734, 
0.510678506104081, 0.510873652408072, 0.524789125711111, 0.510873652408072, 
0.510678506104081, 0.510678506104081), .Dim = c(41L, 1L), .Dimnames = list(
    NULL, NULL)), na.y = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, FALSE, FALSE, FALSE, 
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE
), weight = c(25, 19.2796610169492, 16.228813559322, 14.0360169491525, 
16.7055084745763, 12.3199152542373, 15.9427966101695, 12.4152542372881, 
7.36228813559322, 8.02966101694915, 6.40889830508475, 5.64618644067797, 
5.16949152542373, 3.54872881355932, 4.21610169491525, 4.69279661016949, 
2.6906779661017, 2.5, 3.54872881355932, 3.07203389830508, 0.474025974025974, 
0.227272727272727, 0.811688311688312, 0.155844155844156, 0.155844155844156, 
0.214285714285714, 0.155844155844156, 0.324675324675325, 0.253246753246753, 
0.155844155844156, 0.175324675324675, 0.25974025974026, 0.175324675324675, 
0.175324675324675, 0.25974025974026, 1, 0.324675324675325, 0.188311688311688, 
0.155844155844156, 0.175324675324675, 0.246753246753247), width = c(NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, 2.37012987012987, 1.13636363636364, 4.05844155844156, 
0.779220779220779, 0.779220779220779, 1.07142857142857, 0.779220779220779, 
1.62337662337662, 1.26623376623377, 0.779220779220779, 0.876623376623377, 
1.2987012987013, 0.876623376623377, 0.876623376623377, 1.2987012987013, 
5, 1.62337662337662, 0.941558441558442, 0.779220779220779, 0.876623376623377, 
1.23376623376623)), .Names = c("x", "y", "na.x", "vertex.names", 
"xend", "yend", "na.y", "weight", "width"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "33", "61", "71", "111", 
"121", "131", "141", "171", "181", "191", "201", "21", "22", 
"24", "25", "26", "27", "28", "30", "31", "32"), class = "data.frame")


ggplot2::ggplot(idat, ggplot2::aes(x = x, y = y, xend = xend, yend = yend)) +
    ggnetwork::geom_edges(color = 'gray80', ggplot2::aes(size = width)) +
    ggnetwork::geom_nodes(color = 'orange', ggplot2::aes(size = weight*5)) +
    ggnetwork::geom_nodetext(ggplot2::aes(label = vertex.names)) 

## Error in eval(expr, envir, enclos) : object 'Stat' not found

Session Info

R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] colorspace_1.2-7     scales_0.4.1         assertthat_0.1      
 [4] lazyeval_0.2.0       plyr_1.8.4           sna_2.4             
 [7] tools_3.3.2          gtable_0.2.0         tibble_1.2          
[10] Rcpp_0.12.7          ggrepel_0.6.5        ggplot2_2.2.0       
[13] statnet.common_3.3.0 ggnetwork_0.5.1      grid_3.3.2          
[16] network_1.13.0       munsell_0.4.3       

now loading ggplot2:

library(ggplot2)
ggplot2::ggplot(idat, ggplot2::aes(x = x, y = y, xend = xend, yend = yend)) +
    ggnetwork::geom_edges(color = 'gray80', ggplot2::aes(size = width)) +
    ggnetwork::geom_nodes(color = 'orange', ggplot2::aes(size = weight*5)) +
    ggnetwork::geom_nodetext(ggplot2::aes(label = vertex.names)) 

Error for 2-node, 1-tie network of class `igraph`

g= igraph::random.graph.game(n = 2, p.or.m = 1)
ggnetwork::ggnetwork(g)

throughs in Version 0.5.1:

Error in if (nrow(edges[, 1:2]) > nrow(unique(edges[, 1:2]))) { : 
  argument is of length zero

I think g is a valid Input for ggnetwork.
Any fix ?

geom_nodes() not sizing by nodal attributes

geom_nodes() doesn't seem to be sizing nodes properly when its fed sizes that are related to node attributes.

## repex
data(flo)
n <- network(flo, directed = FALSE)
n%v%'labels' = paste(n%v%'vertex.names', sna::degree(n))

# each time i run this the size of each node changes
ggplot(n, aes(x, y, xend = xend, yend = yend)) +
  geom_edges(colour = "steelblue") +
  geom_nodes(size = degree(n), shape = 21, colour = "steelblue", fill = "white") +
  geom_nodetext(aes(label = labels))+
  theme_blank()

Plot_Zoom

P.S. thank you for creating and sharing this package. It's my favorite network visualization tool.

Edge label coordinates

Thanks for this awesome package!

I would like to place small icon-like images (png) on/near edge labels. Perhaps a bit like *repel. Is there a way to get my hands on the coordinates of the labels so I can add them e.g. like here?

Problem loading the geom-edges.R script

Hi there,

Please, could you review the error I am getting when I am trying to load the *.R files?

geom-edges.R :Error in ggplot2::ggproto("StatEdges", Stat, compute_layer = function(data, :
objet 'Stat' is not found

I was checking on geom-edges.R, and there is neiter declaration or assignment for object Stat.

Note: I was trying to run the following "for" loop for getting load all the *.R files are in your package:

path to the R files inside the package I've just download from GitHub

path="C:\DATOS\GNU-R\briatte-ggnetwork-f58c4d9\briatte-ggnetwork-f58c4d9\R"

A for loop to get all files loaded

for (nm in list.files(path, pattern = "[.][RrSsQq]$")) {
if(trace) cat(nm,":")
source(file.path(path, nm))
if(trace) cat("\n")
}

color edges by weights

Maybe I'm just missing this feature when looking through the documentation, but can ggnetwork be used to easily plot edge colors by weights (eg., strong positive colored bright green; strong negative colored bright red; values within the extremes colors by a gradient)?

I haven't seen an example network like that in the vignette, and I haven't seen any examples of that in the documentation.

To be clear, I've just tried creating ggnetwork objects (data.frames) by inputing a symmetric matrix of interactions.

Support multiple edges

Is there a way or are you planing to implement a way to show multiple edges between the same nodes?

Problem converting igraph to ggnetwork

Hi,
I have an igraph object that I want to visualise using ggnetwork, but I keep getting the same error. I can plot the igraph object like this:
plot(ig)
But if I try this:
ggnetwork(ig)
or this:
ggplot(ig)
I always get this error message:

    Error in .Call(setVertexAttribute_R, x, attrname, value, v) : 
    NULL value passed as symbol address

What does this mean, and how would I fix it?

ggnetwork plotting fails under dev version of ggplot2

I'm sure you're already aware of this (probably received automatically generated emails from Hadley) but ggnetwork fails to plot because of the incompatibility with the new ggproto.

library(geomnet)
library(network)
library(ggnetwork)
data(blood, package = "geomnet")
ggplot(ggnetwork(network(blood$edges[, 1:2]),
                 layout = "circle", arrow.gap = 0.05),
       aes(x, y, xend = xend, yend = yend)) +
  geom_edges(color = "grey50",
             arrow = arrow(length = unit(10, "pt"), type = "closed")) +
  geom_nodes(size = 15, color = "darkred") +
  geom_nodetext(aes(label = vertex.names), color = "grey80") +
  theme_blank()
Error: StatEdges was built with an incompatible version of ggproto.
Please reinstall the package that provides this extension.
sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] network_1.13.0     ggnetwork_0.5.1    geomnet_0.1.2.2    ggplot2_2.1.0.9001

The paper revisions were just about complete when I got my notification from Hadley about the new ggplot2 version. We need to update our packages and put them on CRAN as soon as ggplot2 is released to that we can (finally) submit the paper.

Edge selection

Hi! First of all I want to thank you for the great job with this package. I am working with a weighted network of investments, and I was wondering whether a way exists to plot just part of the edges in the network, but keeping the nodes in the plot. (say, only those edges having weight greater than a minimum threshold). Is it possible to do it with ggnetwork? In case it is not, what package could fit for the purpose?
thank you for any help

A hex logo suggestion (in R with the code)

Here is an hexlogo suggestion using ggnetwork to build it (and some other packages).
Of course, everything can be changed.

set.seed(190723)
library(ggplot2)
library(hexSticker)
library(ggnetwork)
library(network)
library(sna)
library(showtext)

word <- "ggnetwork"
n <- network(rgraph(9, tprob = 0.2), directed = FALSE)
n %v% "family" <- strsplit(word, "")[[1]][c(1, 7, 9, 5, 4, 8, 3, 6, 2)]
n %v% "importance" <- sample(x = 1:4, size = nchar(word), replace = TRUE)
e <- network.edgecount(n)
set.edge.attribute(n, "type", sample(letters[23:26], e, replace = TRUE))
set.edge.attribute(n, "day", sample(1:4, e, replace = TRUE))

font_add_google("Alegreya SC", "alegreyasc")
showtext_auto()

sticker(
  subplot = ggplot(n, aes(x = x, y = y, xend = xend, yend = yend)) +
    geom_edges(colour = "grey50", alpha = 0.5) +
    geom_nodes(aes(colour = family, size = 0.5 * importance), alpha = 1) +
    geom_nodes(aes(colour = family, size = importance), alpha = 0.5) +
    geom_nodetext(
      aes(label = toupper(family)), 
      size = 1 * 5,
      fontface = "bold", 
      family = "alegreyasc"
    ) +
    scale_colour_brewer(palette = "Set1") +
    scale_size(breaks = c(1, 2), range = c(1, 2) * 3) +
    scale_x_continuous(expand = expand_scale(mult = 0.2)) +
    scale_y_continuous(expand = expand_scale(mult = 0.2)) +
    theme_blank() +
    theme(
      legend.position = "none",
      panel.background = ggplot2::element_rect(fill = NA, colour = NA), 
      plot.background = ggplot2::element_rect(fill = NA, colour = NA)
    ), 
  package = "ggnetwork", 
  p_size = 18, 
  p_color = "grey20", 
  p_family = "alegreyasc",
  p_y = 1.5,
  s_x = 1, 
  s_y = 0.80, 
  s_width = 1.5, 
  s_height = 1.5,
  filename = "~/ggnetwork.png",
  h_fill = "grey95", 
  h_color = "grey20"
)

geom_nodes() requires more colors than there are nodes

Cross-posted at StackOverflow.

Create an igraph object with five vertices and two edges:

test <- structure(list(5, TRUE, c(0, 3), c(4, 1), c(0, 1), c(1, 0), c(0, 1, 1, 1, 2, 2), c(0, 0, 1, 1, 1, 2), list(c(1, 0, 1), structure(list(), .Names = character(0)),list(name = c("3", "6", "7", "2", "1")), list(weight = c(3.30310760667904, 3.55724789915966))), environment), class = "igraph")

Check the number of nodes and edges:

igraph::ecount(test)
#> [1] 2
igraph::vcount(test)
#> [1] 5

The following code works (it should not work, notice that the number of color values in geom_nodes() is wrong, there should be five values, but 7 are given):

ggplot(test, aes(x = x, y = y, xend = xend, yend = yend)) + 
  geom_edges(arrow = arrow(), color = 'black') + 
  geom_nodes(size =10, aes(color=1:7/(7))) + 
  scale_color_gradient(low = "green", high = "red")

See plot here.

If the correct number of values for geom_nodes(aes(color=<five values>)) is used instead, an error is generated:

ggplot(test, aes(x = x, y = y, xend = xend, yend = yend)) + 
  geom_edges(arrow = arrow(), color ='black') + 
  geom_nodes(size =10, aes(color=1:5/(5))) + 
  scale_color_gradient(low = "green", high = "red")
#> Error: Aesthetics must be either length 1 or the same as the data (7): colour

Notice that geom_nodes seems to require that color = nodes + edges, why is this?

Is there a way around this?

If there are 7 colors passed, how does it decide which 5 to use for the node colors?

Provide an option to avoid rescaling for geographic network layout

Referencing this question on stackoverflow: https://stackoverflow.com/questions/49695218/ggnetwork-how-to-set-geographic-information-on-the-vertex -

you can supply coordinates of nodes as matrix. But it uses scale function, and original values got lost, only relative positions kept. So need to undo the scaling, or modify source to bypass scaling. It's in somewhere near line 130 of R/fortify.network.R

Maybe this capacity could be made as an option in the ggnetwork function?

This would allow to plot directly a graph using geographic coordinates without twisting the code...

xend, yend not properly calculated with Kamada Kawai on tree structures

I have a graph with a tree structure. Only Kamada Kawai reveals the rooted structure, but something seems to be preventing the nodes from connecting. In essence, the xend and yend properties are not being properly computed. I'm not sure if this is an issue with how I'm parameterizing the layout algorithm or styling the elements; however, the node placement looks good and it should be trivial for the algorithm to properly place the endpoint for edges. It isn't though, see below. This happens whether or not I provide edge weights to the layout algorithm

image

`fortify.igraph` messes with vertex/edge attribute types

See reprex at end of issue.

This is because fortify.network uses dumb for loops to import vertex/edge attributes (show vertex attributes only below):

# import vertex attributes
for (y in network::list.vertex.attributes(model)) {
nodes <- cbind(nodes, network::get.vertex.attribute(model, y), stringsAsFactors = stringsAsFactors)
names(nodes)[ncol(nodes)] <- y
}

This preserves attributes (column) types. By contrast, the (smarter) code in fortify.igraph uses sapply, which erroneously converts all vertex/edge attributes to character if a single attribute is of that class, resulting in numeric attributes being converted to characters (and then to factors, unless stringsAsFactors has been set to FALSE: see #53):

# import vertex attributes
if (length(igraph::list.vertex.attributes(model))) {
nodes <- cbind(
nodes,
sapply(
igraph::list.vertex.attributes(model),
FUN = igraph::get.vertex.attribute,
graph = model,
USE.NAMES = TRUE
),
stringsAsFactors = stringsAsFactors
)
}

Solution (1) would be to use purrr::map_dfc to get the sapply method to preserve column types, but that would end up being more complex than a for at the cost of additional dependencies (including dplyr, since purrr::map_dfc relies on it).

Solution (2), which is dumber but better in this context, is to use for loops in fortify.igraph, as in fortify.network.

Solution (3), the best one in my view, is to use igraph::as_data_frame(x, what = "vertices") and igraph::as_data_frame(x, what = "edges") to import vertex and edge attributes, which is what I'll do, unless @jcfisher has a better fix.

library(ggnetwork)
#> Loading required package: ggplot2
library(network)
#> network: Classes for Relational Data
#> Version 1.15 created on 2019-04-01.
#> copyright (c) 2005, Carter T. Butts, University of California-Irvine
#>                     Mark S. Handcock, University of California -- Los Angeles
#>                     David R. Hunter, Penn State University
#>                     Martina Morris, University of Washington
#>                     Skye Bender-deMoll, University of Washington
#>  For citation information, type citation("network").
#>  Type help("network-package") to get started.
library(igraph)
#> 
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:network':
#> 
#>     %c%, %s%, add.edges, add.vertices, delete.edges,
#>     delete.vertices, get.edge.attribute, get.edges,
#>     get.vertex.attribute, is.bipartite, is.directed,
#>     list.edge.attributes, list.vertex.attributes,
#>     set.edge.attribute, set.vertex.attribute
#> The following objects are masked from 'package:stats':
#> 
#>     decompose, spectrum
#> The following object is masked from 'package:base':
#> 
#>     union
library(intergraph)

# network with numeric and character edges
data(emon, package = "network")
emon[[1]]
#>  Network attributes:
#>   vertices = 14 
#>   directed = TRUE 
#>   hyper = FALSE 
#>   loops = FALSE 
#>   multiple = FALSE 
#>   total edges= 83 
#>     missing edges= 0 
#>     non-missing edges= 83 
#> 
#>  Vertex attribute names: 
#>     Command.Rank.Score Decision.Rank.Score Formalization Location Paid.Staff Sponsorship vertex.names Volunteer.Staff 
#> 
#>  Edge attribute names: 
#>     Frequency
intergraph::asIgraph(emon[[1]])
#> IGRAPH 031e6f4 D--- 14 83 -- 
#> + attr: Command.Rank.Score (v/n), Decision.Rank.Score (v/n),
#> | Formalization (v/n), Location (v/c), na (v/l), Paid.Staff (v/n),
#> | Sponsorship (v/c), vertex.names (v/c), Volunteer.Staff (v/n),
#> | Frequency (e/n), na (e/l)
#> + edges from 031e6f4:
#>  [1]  2->1  3->1  8->1  9->1 14->1  1->2  3->2  4->2  8->2  1->3  2->3
#> [12]  4->3  7->3 12->3 13->3  1->4  3->4  8->4  1->5  3->5  8->5 14->5
#> [23]  3->6  8->6  9->6  1->7  2->7  3->7  4->7  5->7  8->7  9->7 10->7
#> [34] 11->7 12->7 13->7  1->8  2->8  3->8  5->8  7->8  9->8 12->8 13->8
#> [45] 14->8  1->9  2->9  3->9  4->9  8->9 10->9 11->9 12->9 13->9
#> + ... omitted several edges

# all goes well with fortify.network, characters as factors (as per #53)
str(ggnetwork(emon[[1]]))
#> 'data.frame':    97 obs. of  15 variables:
#>  $ x                  : num  0.134 0 0.628 0.111 0.561 ...
#>  $ y                  : num  0.68 0.485 0.447 0.246 1 ...
#>  $ Command.Rank.Score : num  0 10 3 5 0 0 20 40 10 30 ...
#>  $ Decision.Rank.Score: num  20 7 0 5 0 0 20 50 10 20 ...
#>  $ Formalization      : num  2 1 1 1 1 1 1 2 1 3 ...
#>  $ Location           : Factor w/ 1 level "L": 1 1 1 1 1 1 1 1 1 1 ...
#>  $ na.x               : logi  FALSE FALSE FALSE FALSE FALSE FALSE ...
#>  $ Paid.Staff         : num  10 400 200 60 1 7 60 7 70 100 ...
#>  $ Sponsorship        : Factor w/ 6 levels "City","County",..: 6 6 6 4 5 5 2 3 1 1 ...
#>  $ vertex.names       : Factor w/ 14 levels "A.1.Ambulance.Service",..: 12 14 13 4 9 10 8 5 2 3 ...
#>  $ Volunteer.Staff    : num  50 2000 0 0 20 80 20 100 0 0 ...
#>  $ xend               : num  0.134 0 0.628 0.111 0.561 ...
#>  $ yend               : num  0.68 0.485 0.447 0.246 1 ...
#>  $ Frequency          : num  NA NA NA NA NA NA NA NA NA NA ...
#>  $ na.y               : logi  NA NA NA NA NA NA ...

# however, fortify.igraph messes with the (vertex) attribute types
str(ggnetwork(intergraph::asIgraph(emon[[1]])))
#> 'data.frame':    97 obs. of  15 variables:
#>  $ x                  : num  0.662 0.724 0.392 0.537 0.424 ...
#>  $ y                  : num  0.414 0.69 0.664 1 0 ...
#>  $ Command.Rank.Score : Factor w/ 8 levels "0","10","2","20",..: 1 2 5 8 1 1 4 7 2 6 ...
#>  $ Decision.Rank.Score: Factor w/ 8 levels "0","10","2","20",..: 4 8 1 6 1 1 4 7 2 4 ...
#>  $ Formalization      : Factor w/ 3 levels "1","2","3": 2 1 1 1 1 1 1 2 1 3 ...
#>  $ Location           : Factor w/ 1 level "L": 1 1 1 1 1 1 1 1 1 1 ...
#>  $ na.x               : Factor w/ 1 level "FALSE": 1 1 1 1 1 1 1 1 1 1 ...
#>  $ Paid.Staff         : Factor w/ 9 levels "0","1","10","100",..: 3 6 5 7 2 8 7 8 9 4 ...
#>  $ Sponsorship        : Factor w/ 6 levels "City","County",..: 6 6 6 4 5 5 2 3 1 1 ...
#>  $ vertex.names       : Factor w/ 14 levels "A.1.Ambulance.Service",..: 12 14 13 4 9 10 8 5 2 3 ...
#>  $ Volunteer.Staff    : Factor w/ 7 levels "0","100","20",..: 5 4 1 1 3 7 3 2 1 1 ...
#>  $ xend               : num  0.662 0.724 0.392 0.537 0.424 ...
#>  $ yend               : num  0.414 0.69 0.664 1 0 ...
#>  $ Frequency          : num  NA NA NA NA NA NA NA NA NA NA ...
#>  $ na.y               : num  NA NA NA NA NA NA NA NA NA NA ...

Created on 2019-07-30 by the reprex package (v0.3.0)

Packages taking forever to load

Problem description

I am using the latest version of ggnetwork. I can load the package just fine:
library(ggnetwork)

However, when I use the ggnetwork() function for the first time in a session, it takes around 5 minutes to run. Subsequent function calls are very fast. It's just the initial call that is mind numbingly slow.

I think there must be a problem loading packages, but I'm not sure where to begin. I will paste the warning messages I receive below. If you can help out or offer any suggestions I would appreciate it.

Output BEFORE the code stalls:

Loading tidyverse: readr
Loading tidyverse: purrr
Loading tidyverse: dplyr
Conflicts with tidy packages ---------------------------------------------------
accumulate():    purrr, foreach
arrange():       dplyr, Seurat
as_data_frame(): dplyr, tibble, igraph
between():       dplyr, data.table
col_factor():    readr, scales
col_numeric():   readr, scales
compose():       purrr, igraph
crossing():      tidyr, igraph
discard():       purrr, scales
expand():        tidyr, Matrix
filter():        dplyr, stats
first():         dplyr, data.table
ggsave():        ggplot2, cowplot
groups():        dplyr, igraph
lag():           dplyr, stats
last():          dplyr, data.table
simplify():      purrr, igraph
transpose():     purrr, data.table
when():          purrr, foreach

Wait 5 minutes here…

Output AFTER the code starts running again:

Loading required package: sna
Loading required package: statnet.common
Loading required package: network
network: Classes for Relational Data
Version 1.13.0 created on 2015-08-31.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
                    Mark S. Handcock, University of California -- Los Angeles
                    David R. Hunter, Penn State University
                    Martina Morris, University of Washington
                    Skye Bender-deMoll, University of Washington
 For citation information, type citation("network").
 Type help("network-package") to get started.


Attaching package: 'network'

The following objects are masked from 'package:igraph':

    %c%, %s%, add.edges, add.vertices, delete.edges, delete.vertices,
    get.edge.attribute, get.edges, get.vertex.attribute, is.bipartite,
    is.directed, list.edge.attributes, list.vertex.attributes,
    set.edge.attribute, set.vertex.attribute

sna: Tools for Social Network Analysis
Version 2.4 created on 2016-07-23.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
 For citation information, type citation("sna").
 Type help(package="sna") to get started.


Attaching package: 'sna'

The following objects are masked from 'package:igraph':

    betweenness, bonpow, closeness, components, degree, dyad.census,
    evcent, hierarchy, is.connected, neighborhood, triad.census

Can't handle networks with no edges

If I make a network with only nodes, no edges

library(ggplot2)
library(network)
library(ggnetwork)

D <- matrix(c(1, 0, 0,
              0, 1, 0,
              0, 0, 1),
            nrow = 3,
            ncol = 3)

net <- network(D)

Then ggnetwork can't convert this to a dataframe:

> ggnetwork(net)
Error in xj[i, , drop = FALSE] : subscript out of bounds

Edge attributes not converted to factors

The problems described in #53 and #54 have a little cousin:

return(unique(rbind(nodes, edges[!is.na(edges$xend), ])))

rbind uses the types of the first argument (here nodes) to determine the types of the second one. This causes edge attributes of class character to never be returned as factors, even if the user asks so (which is the default: see #53).

The problem affects both fortify.network and fortify.igraph.

The arguments passed to rbind need to be reversed, which will affect the result of ggnetwork but should not affect plots produced with it.

Borders around geom_edgetext

When using geom_edgetext to place text in the middle of edges borders appear around the text, and they cannot be removed with line.size, or when swiching to geom_edgelabel, and then utilizing label.size.

`covr::coveralls()` in travis not working

covr::coveralls() is not working (no remote project) and should be removed from travis since covr::codecov() is already working and has been setup.

$ Rscript -e 'covr::coveralls(); covr::codecov()'
Warning: namespace ‘ggnetwork’ is not available and has been replaced
by .GlobalEnv when processing object ‘’
Warning: namespace ‘ggnetwork’ is not available and has been replaced
by .GlobalEnv when processing object ‘’
Error in covr::coveralls() : 
  Failed to upload coverage data. Reply by Coveralls: Couldn't find a repository matching this job.
Execution halted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.