Um texto embutido e sem conjunto de caracteres especificado foi limpo... Nome: n?o dispon?vel Url: <https://stat.ethz.ch/pipermail/r-help/attachments/20121019/36ff4201/attachment.pl>
multiple graphs, lapply and different titles
2 messages · Flavio Barros, David Winsemius
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