Skip to content
Prev 10772 / 12125 Next

[R-pkg-devel] Options "reset" when options(opts)

Dear John,

You need to collect the return value when setting options. This will include an explicit NULL value for an option that was previously NULL. 

Best,

Greg Jefferis.

options(digits.secs = NULL)

noset2 = function() {
  opts <- options(digits.secs = 3)
  on.exit(options(opts))
  print(opts)
}
NULL
$digits.secs
NULL
NULL

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

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
https://www.zoo.cam.ac.uk/research/groups/connectomics