I have a directed graph and would like to export a table of vertices with metrics such as "in degree", "out degree", and "total degree", all in one.
g <- graph( c("John", "Jim", "Jim", "Jill", "Jill", "John"))
Now that we have a sample directed graph, I would like to get the in, out, and total degree listed for each vertices.
degree(g, mode = c("in", "out", "total"))
This error is returned:
Error in match.arg(arg = arg, choices = choices, several.ok = several.ok) : 'arg' must be of length 1
What am I doing wrong? I could do each one individually but I don't how to concatenate them all together.