search for: chatrcater

Displaying 1 result from an estimated 1 matches for "chatrcater".

Did you mean: charcater
2007 May 10
1
how to pass "arguments" to a function within a function?
...examplefun <- function(fun, vars=vars.in, ...) { for(v in 1: ncol(vars) ) { assign( names(vars)[v] , vars[1,v] , env=.GlobalEnv) } fun(...) } a. FUN = another function (e.g. minus() that takes as its inputs variables of type chatrcater b. vars = (a data.frame with the names of variables that will be passed to "FUN" My problem: various inputs for "FUN" will require different arguments. These arguments will be contained in the column names of "vars". How do I pass these arguments to FUN()? My exam...