On Mon, Oct 27, 2008 at 2:24 PM, Wade Wall <[EMAIL PROTECTED]> wrote: > Hi Gabor, > > Thanks for the code, it's what I was looking for. The route I was > thinking about was to use, based on your code, the names from > my.data.frames as a pointer to the actually dataframes. > > I was envisioning something like > > a <- data.frame(1:10) > b <- data.frame(10:1) > c <- data.frame(letters[1:20]) > my.data.frames <- c("a", "b", "c") > > for (i in length(my.data.frames)) { > function(my.data.frames[[i]]*, arguments) > } > > with my.data.frame[[i]]* acting as a pointer to the actual data.frame. > > Is it possible to create pointers from a list of data frame names to > the actual data frames?
I think it was in my previous email, but then again, use "get" to put them in a list: all.data <- lapply(my.data.frames, get) and then you can handle them easily, e.g. your example would be something like lapply(all.data, function, arguments) It is not necessary to put them in a list, but I think it is cleaner than using "get" all the time. G. > Thanks for the help. > > Wade > -- Gabor Csardi <[EMAIL PROTECTED]> UNIL DGM ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.