I would like to evaluate a certain function g inside of a function f, but the arguments of g are given to f in a list.
f and g are defined in this way:
g <- function(a,b){
a+b
}
f <- function(x, y, l){
# do some stuff on x and y
z <- g(l) # Not working
# do some stuff on x, y and z
}
I would like to run f in this way:
f(xx, yy, list(a=aa, b=bb)
where aa, bb, xx, yy are some R objects.
How could I do that?