On Oct 19, 2012, at 12:30 PM, Flavio Barros wrote:
> I have a list of data.frames, and i want to iterate over this list and
> generate graphs with the same title of the data.frame.
>
> I did the graphs with:
>
> lapply(anual, function(x) plot(x[,'chuva'], type='l', xlab=
'anos', ylab > 'Precicipata??o(mm)', col='red'))
>
> where anual is list of data.frames. I am plotting just the column
"chuva"
> at each data.frame.
>
> How can i do that?
Easiest way would be to iterate over the names of the list 'anual' and
then use nam as your formal argument, pull each data.frame in from
'anual' with anual[nam] and use main=nam in the plot command.
> and provide commented, minimal, self-contained, reproducible code.
Had you provided a self-contained example I would have offered tested code in
return.
--
David Winsemius, MD
Alameda, CA, USA