Skip to content
Prev 78780 / 398502 Next

problem with lapply(x, subset, ...) and variable select argument

Just one simple shortening of DR's solution:

tt <- function (n) {
   x <- list(data.frame(a=1,b=2), data.frame(a=3,b=4))
   print(sapply(x, function(...) subset(...), select = n))
}

n <- "b"
tt("a")
On 10/11/05, Dimitris Rizopoulos <dimitris.rizopoulos at med.kuleuven.be> wrote: