Closed jesscowart closed 7 months ago
Hi @jesscowart! The LondonGangNet
object is one of class network
. The colSums()
and rowSums()
functions needs an object of class matrix
. You can address this in two ways.
First, you can coerce the object to a matrix like this:
colSums( as.matrix( LondongGangNet ) )
Or, you can use the degree()
function in the sna
package.
Let me know if you are still experiencing issues!
Thank you!
Your welcome!
I am reopening this issue so that others can see it in case it pertains to them.
I am trying to calculate the degree for each actor for the undirected binary graph, but when I run colSums() or rowSums(), it gives me an error: 'x' must be an array of at least two dimensions.
Here is my code: