LoslegenKostenlos loslegen

More ggnet Plotting Options

The real power of ggnet and other alternatives to igraph is that they offer a way to generate advanced plots with just a little parameterization. In the earlier example comparing the two plotting methods, they were somewhat similar. However, in this lesson we'll show how you can make more advanced plots. We'll take the Twitter data set and using igraph add several vertex attributes, centrality and community, and plot them quickly using ggnet.

The centrality and community membership attributes you created in the last exercise are still present.

Diese Übung ist Teil des Kurses

Case Studies: Network Analysis in R

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Convert to a network object
retweet_net <- ___(___)

# Plot with ggnet2
ggnet2(
  ___
  # Set the node size to cent
  ___ = "___", 
  # Set the node color to comm
  ___ = "___", 
  # Set the color palette to Spectral
  ___ = "___", 
)
Code bearbeiten und ausführen