[R] how to iterate through a list using ls

From: Lo, Ken <ken.lo_at_roche.com>
Date: Sat, 01 Nov 2008 19:54:56 -0400

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.


R-help_at_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. Received on Sat 01 Nov 2008 - 23:57:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 02 Nov 2008 - 01:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive