[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] cannot set CRAN igraph option from inside another R package

From: Dr Gregory Jefferis
Subject: [igraph] cannot set CRAN igraph option from inside another R package
Date: Thu, 23 Mar 2017 12:37:55 +0000

Dear Gabor et al.,

I use igraph in a number of R packages that I have written for computational neuroanatomy. Thanks for your contributions!

igraph 1.0 introduced a new return structure (controlled by the return.vs.es option) that in some use cases for me can be a couple of orders of magnitude slower.

I see this for example when computing the neighborhood for a graph representing at 50,000 node neuron and it is the difference between an operation taking 1.2s or 72s.

So I decided to set the package option inside my package like so


However when I do this if igraph is listed as Imports: but not Depends: then I get the following error.

Error in assign(".igraph.pars", current, envir = env) :
  cannot change value of locked binding for '.igraph.pars'
Called from: assign(".igraph.pars", current, envir = env)

Is there any way round this? I believe this is fixed in the development version of igraph, but I have quite a lot of users users now and I cannot rely on them to compile igraph from scratch rather than use CRAN.

There is a test package with a toy example here


With many thanks for any suggestions,


Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK


reply via email to

[Prev in Thread] Current Thread [Next in Thread]