search for: someargs

Displaying 11 results from an estimated 11 matches for "someargs".

2001 Apr 23
4
What happened to --desktop geom?
Hey, I'd like to apologize in advance if this is an old issue that everyone already dealt with in some new mechanism... But I compiled today's CVS for the first time in a few months, and when i tried to fire up programs/games with --desktop geom 640x480 (or any other dimensions) I get an "unknown option --desktop" error and the "usage" list pops up. I read the man
2018 Jan 14
2
consolidate three function into one
...o one I have not looked at your code *at all*, so I am not sure what exactly you mean by "consolidate." Is this what you are after? f1 <- function(...) { code 1} f2 <- function(...) { code 2} f3 <- function(...) { code 3} ## can be "consolidated as": f <- function( someargs, ...){ if( expr(someargs)) f1(...) else if(expr2(someargs)) f2(...) else f3(...) } The "..." argument to f can soak up any named additional arguments you wish to pass to f1, f2, or f3. My apologies if this is offbase or too vague, and feel free to ignore in that case. I don't have the...
2018 May 04
1
length of `...`
The one difference I see, is the necessity to pass the dots to the function dotlength : dotlength <- function(...) nargs() myfun <- function(..., someArg = 1){ n1 <- ...length() n2 <- dotlength() n3 <- dotlength(...) return(c(n1, n2, n3)) } myfun(stop("A"), stop("B"), someArg = stop("c")) I don't really see immediately how one can
2018 Jan 14
0
consolidate three function into one
...ode *at all*, so I am not sure what exactly you mean by "consolidate." > Is this what you are after? > > f1 <- function(...) { code 1} > f2 <- function(...) { code 2} > f3 <- function(...) { code 3} > ## can be "consolidated as": > f <- function( someargs, ...){ > if( expr(someargs)) f1(...) > else if(expr2(someargs)) f2(...) > else f3(...) > } > The "..." argument to f can soak up any named additional arguments you wish to pass to f1, f2, or f3. > My apologies if this is offbase or too vague, and feel free to ignore in t...
2018 Jan 14
0
consolidate three function into one
...o one I have not looked at your code *at all*, so I am not sure what exactly you mean by "consolidate." Is this what you are after? f1 <- function(...) { code 1} f2 <- function(...) { code 2} f3 <- function(...) { code 3} ## can be "consolidated as": f <- function( someargs, ...){ if( expr(someargs)) f1(...) else if(expr2(someargs)) f2(...) else f3(...) } The "..." argument to f can soak up any named additional arguments you wish to pass to f1, f2, or f3. My apologies if this is offbase or too vague, and feel free to ignore in that case. I don't have the...
2018 Jan 15
2
consolidate three function into one
...ode *at all*, so I am not sure what exactly you mean by "consolidate." > Is this what you are after? > > f1 <- function(...) { code 1} > f2 <- function(...) { code 2} > f3 <- function(...) { code 3} > ## can be "consolidated as": > f <- function( someargs, ...){ > if( expr(someargs)) f1(...) > else if(expr2(someargs)) f2(...) > else f3(...) > } > The "..." argument to f can soak up any named additional arguments you wish to pass to f1, f2, or f3. > My apologies if this is offbase or too vague, and feel free to ignore in t...
2018 Jan 15
0
consolidate three function into one
...tly > you mean by "consolidate." > > Is this what you are after? > > > > f1 <- function(...) { code 1} > > f2 <- function(...) { code 2} > > f3 <- function(...) { code 3} > > ## can be "consolidated as": > > f <- function( someargs, ...){ > > if( expr(someargs)) f1(...) > > else if(expr2(someargs)) f2(...) > > else f3(...) > > } > > The "..." argument to f can soak up any named additional arguments you > wish to pass to f1, f2, or f3. > > My apologies if this is offbase or too...
2007 May 13
2
ActionMailer outside of Rails?
Has anyone used ActionMailer outside of rails? I have a requirement for work that will not allow me to do this from within a rails app. I have successfully sent an email in the following manner: MyMailer.deliver_clever_email(someArg,''testing!'') where the second argument is the body of the email, but when I try to call just: MyMailer.deliver_clever_email(someAr) and use a
2018 May 06
0
length of `...`
Does anyone notice r-devel thread "stopifnot() does not stop at first non-TRUE argument" starting with https://stat.ethz.ch/pipermail/r-devel/2017-May/074179.html ? I have mentioned (function(...)nargs())(...) in https://stat.ethz.ch/pipermail/r-devel/2017-May/074294.html . Something like ..elt(n) is switch(n, ...) . I have mentioned it in
2018 Jan 15
1
consolidate three function into one
...ode *at all*, so I am not sure what exactly you mean by "consolidate." > Is this what you are after? > > f1 <- function(...) { code 1} > f2 <- function(...) { code 2} > f3 <- function(...) { code 3} > ## can be "consolidated as": > f <- function( someargs, ...){ > if( expr(someargs)) f1(...) > else if(expr2(someargs)) f2(...) > else f3(...) > } > The "..." argument to f can soak up any named additional arguments you wish to pass to f1, f2, or f3. > My apologies if this is offbase or too vague, and feel free to ignore in t...
2018 May 03
3
length of `...`
Hi, It would be great if one of the experts could comment on the difference between Hadley's dotlength and ...length? The fact that someone bothered to implement a new primitive for that when there seems to be a very simple and straightforward R-only solution suggests that there might be some gotchas/pitfalls with the R-only solution. Thanks, H. On 05/03/2018 08:34 AM, Hadley Wickham