[R] print dataframe names in loop

Kai Mx govokai at gmail.com
Fri May 15 14:05:58 CEST 2015

Hi everybody,

I just can't  figure this out:

I have a loop trough several dataframes such as

for (df in list(df1, df2, df3, ...)) {
..some functions with df..

now I want to print out the current dataframes name (ie the list items
name) with the cat command before the actual functions to have better
orientation in the output.
However, I haven't been successful with different variations of deparse(),
substitute(), (cat(substitute(df)) gives me 'df' for the whole loop).

Could somebody please enlighten me?

Thanks so much!



	[[alternative HTML version deleted]]

More information about the R-help mailing list