· Diameter Function
· It is a function that returns the diameter of the graph: which is the average of the shortest path lengths between all pairs of nodes in a graph
· The diameter of a graph is the length of the longest geodesic.[footnoteRef:1] [1: http://igraph.org/r/doc/diameter.html ]
· Geodesic is defined as the shortest possible line between two points on a sphere or other curved surface.
· I chose this function as it pertained to finding the central person (not via # of edges)
· > diameter(gg, directed= FALSE, unconnected = FALSE, weights= NULL)
· [1] 333
· > get_diameter(gg, directed= FALSE, unconnected = FALSE, weights= NULL)
· + 0/333 vertices, named:
· These were used on the 0.edges file
· Connected Components
· com<-Components(graph)
· Then use groups(com) to visualize the groups more easily
· Using the same 0.edges one can conclude there are 5 groups
· The functions provides numerical names for the groups and lists their contents
· I figured this would be tangentially related to the central person.
· Question 5) Central Person
· This is defined as the node(s) with the highest degree
· Max(degree(G)) will give you the highest degree in graph G
· Comparing this with degree(G) will give you True or False Values for every node (degree)
· Only the node(s) with the largest degree will have True
· V(g)$name would print every name of G normally
· We just want to print the True values
· Here were my steps
· Step 1) input the data and convert it to a graph
· Step 2 was to plot (to visualize) and also the apply our search function
· The Result was node (person)
· 2543