[R] how to iterate through a list using ls

Lo, Ken ken.lo at roche.com
Sun Nov 2 00:54:56 CET 2008


Hi all,

I know this is an idiotic question, but I am trying to iterate through a
list of data.frame using ls (I have named the data frames in a way that
lets me subset them with ls(pattern="test", for example).  But ls
returns a character vector.  How to I refer to the data frames by their
names in the list instead of the actual string?

Thanks a bunch.

Ken



More information about the R-help mailing list