Session Ready
Exercise

Edge attributes and subsetting

In this exercise you will learn how to add attributes to edges in the network and view them. For instance, we will add the attribute 'hours' that represents how many hours per week each pair of friends spend with each other.

Instructions
100 XP
  • Create a new edge attribute called 'hours' from the vector hours using set_edge_attr().
  • View all edge attributes using edge_attr().
  • View all edges that include the person "Britt".
  • View all edges where the attribute hours is greater than or equal to 4 hours.