hans glick
hans glick

Reputation: 2611

R - Igraph - degree function seems not working in linux environnement

On windows (work great!)

library("igraph")
g <- make_ring(10)
degree(g)
[1] 2 2 2 2 2 2 2 2 2 2

On linux (do not work)

library("igraph")
g <- make_ring(10)
degree(g)
Error in FUN(X[[i]], ...) : 
  as.edgelist.sna input must be an adjacency matrix/array, edgelist matrix, network, or sparse matrix, or list thereof.

Have you ever noticed that? If yes, how did you do to bypass the problem?

Upvotes: 0

Views: 453

Answers (1)

hans glick
hans glick

Reputation: 2611

Ok, it seems degree function was masked by sna package, so, in order to bypass the problem, do the following :

igraph::degree(g)

Upvotes: 2

Related Questions