Greetings,

I would like to flexibly combine several data frames objects without specifying the exact names of the objects in memory. Should I use indexing to call those objects out of memory? I regularly use indexes to flexibly extract parts of data frames and lists and to read files from my hard drive, but I can't figure out how to do so with stored objects.

In my case, all of the data frames of interest are formatted the same way and have been assigned to objects with the prefix "data.". The following examples combine only the names (not the objects themselves):
rbind(ls()[grep("data.", ls(), fixed=T)])
list(ls()[grep("data.", ls(), fixed=T)])

Is there a way to get ls() (or some other function) to return the object instead of just the name? I searched the help files and the R-help archives but couldn't find a solution. Thanks in advance.

Sincerely,
Chris

--
Christopher T. Moore, M.P.P.
Doctoral Student
Quantitative Methods in Education
University of Minnesota
44.9785°N, 93.2396°W
moor0...@umn.edu
http://umn.edu/~moor0554

______________________________________________
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.

Reply via email to