Displaying 1 result from an estimated 1 matches for "cfoo".
Did you mean:
_foo
2007 May 18
3
lapply not reading arguments from the correct environment
Hello,
I am facing a problem with lapply which I ''''think''' may be a bug.
This is the most basic function in which I can reproduce it:
myfun <- function()
{
foo = data.frame(1:10,10:1)
foos = list(foo)
fooCollumn=2
cFoo = lapply(foos,subset,select=fooCollumn)
return(cFoo)
}
I am building a list of dataframes, in each of which I want to keep
only column 2 (obviously I would not do it this way in real life but
that's just to demonstrate the bug).
If I execute the commands inline it works but if I clean my...