On Monday 03 March 2008 (23:28:05), lucy b wrote:
> I would like to avoid having to type-out a very long list over and
> over again. I have tried every variation I could think of similar to:
>
> for(df in list(noquote(ls()))) {
>
>      do stuff with df
>
>      }
>
> I know this has to be possible. What am I missing?
I guess something like the following will do what you want,
but I am not completely sure ...

for(dfname in ls()){
 eval(substitute({
                <do stuff with df>
                },
                list(
                  df=as.name(dfname)
                  )
                )
      )
        
}

HTH,
Martin

______________________________________________
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