Skip to content
Prev 342975 / 398506 Next

how to process multiple data files using R loop

On Aug 8, 2014, at 11:25 AM, Fix Ace wrote:

            
The results from `ls()` are not actual R names but rather are character vectors. To "promote" a character value to an R language-name you need the `get` function:
for(i in ls(pattern="P_")){ head(get(i), 2)}  # Should work.

David.
David Winsemius
Alameda, CA, USA