search for: foo3arg

Displaying 3 results from an estimated 3 matches for "foo3arg".

Did you mean: foo_arg
2006 Oct 24
2
as.missing
...Often I have a function which calls other functions, and may often use the default arguments to those functions, but needs the capability to pass along non-default choices. I usually do this with some variation on foo <- function(x, foo2Args=NULL or a list(foo2defaults), foo3Args=NULL or a list(foo3defaults)) and then have logic to check for NULL, or use the list in combination with do.call. It is also possible to do this with ..., but it always seems a bit dangerous passing all the unnamed arguments along to all the functions being called, especially when I always se...
2010 Feb 10
1
How to solve: Error in * unused argument(s) ?
Hi all, For some reason, I would like to use functions bellow (see example code bellow), but instead I get the following error message: *Error in foo2(...) : unused argument(s) (arg3 = 3)* #--------------------- # example code #--------------------- foo1 <- function(arg1,...) { print(arg1) foo2(...) foo3(...) } foo2 <- function(arg2) { print(arg2) } foo3 <- function(arg3) {
2006 Jun 29
3
advice on arguments
I have a general style question about R coding. Suppose I'm writing a function (foo1) that calls other functions (foo2, foo3, ...) which have complicated argument lists (e.g. optim(), plot()), _and_ I may be calling several different functions in the body of foo1. Since foo2 and foo3 have different sets of arguments, I can't just use "..." ; I did write some code a while ago