Skip to content
Prev 258198 / 398502 Next

setting options only inside functions

Thanks to all who supplied suggestions. All of them worked. The best solution, however, was to wrap the stuff inside dummy() after the options(...) into a try() command. That way it also worked with the following setup:



dummy=function()
{
  old.options=options(error=quote{dummy1()})

  try(....,silent=TRUE)

  options(old.options)
}
options(error=quote{dummy()})



The suggestion of Uwe did not work with these nested error handling functions. I, however, did not state my problem precisely enough for this.


Thanks again

Jannis


--- Jonathan Daily <biomathjdaily at gmail.com> schrieb am Mi, 27.4.2011: