Try to set igraph vs.es option when computing neighborhood

set_igraph_option(g = igraph::make_ring(10), set.vs.es = TRUE)

Arguments

g

A graph (defaults to a 10 member ring)

set.vs.es

Whether to set the igraph vs.es option (default TRUE)

Examples

# OK nn=set_igraph_option(set.vs.es=FALSE) # errors out nn=set_igraph_option()
#> Error in assign(".igraph.pars", current, envir = env): cannot change value of locked binding for '.igraph.pars'
# OK again if igraph is attached library(igraph)
#> #> Attaching package: ‘igraph’
#> The following objects are masked from ‘package:stats’: #> #> decompose, spectrum
#> The following object is masked from ‘package:base’: #> #> union
nn=set_igraph_option()