Skip to content
Prev 90027 / 398498 Next

Evaluating a function with another function

I assume you want a list containing length(x) data frames, one per
list component.  If that's it try this:

test <- function(x = 1:4, s = 1:2, rangit = 0:11)
   lapply(x, function(x) data.frame(rangit, y = x+s[1]+rangit, p=x+s[2]+rangit))
test() # test run
On 4/6/06, Guenther, Cameron <Cameron.Guenther at myfwc.com> wrote: