search for: withoptions

Displaying 4 results from an estimated 4 matches for "withoptions".

Did you mean: with_options
2011 Sep 01
1
parser does not catch strings without closing quote
Shouldn't the parser complain about unfinished strings in files? It doesn't and will tack on a newline if there isn't one there. > withOption <- function(optionList, expr) { + oldOption <- options(optionList) + on.exit(options(oldOption)) + expr + } > cat(file=tf<-tempfile(), "\"string without closing quote\n") > p <-
2012 Oct 19
2
setting option in function
is it possible to set an option inside a function ((I want to set na.action = na.fail) and have the previous state restored if there is an error so that the function doesn't change the option behind the user's back? Sorry if this has been answered before, but this subject is hard to Google. -- Charles Geyer Professor, School of Statistics University of Minnesota charlie at stat.umn.edu
2015 Feb 09
1
WISH: eval() to preserve the "visibility" (now value is always visible)
Sorry to intervene. Argument passed to 'eval' is evaluated first. So, eval(x <- 2) is effectively like { x <- 2; eval(2) } , which is effectively { x <- 2; 2 } . The result is visible. eval(expression(x <- 2)) or eval(quote(x <- 2)) or evalq(x <- 2) gives the same effect as x <- 2 . The result is invisible. In function 'eval2', res <-
2020 Jan 07
1
Another wish (?) for R 4.0.0: print(*, width = <n>)
On Tue, Jan 7, 2020 at 6:14 AM brodie gaslam via R-devel <r-devel at r-project.org> wrote: > > For whatever my 2c are worth I think this would be nice. I'm still uncomfortable at having to call `options` in my package `diffobj` to set output width. Adding a few more cents: It might be worth considering "who" should be allow to control the 'width' argument. In