Making multiple plots in R from one textfile
===

I'm new to R and trying to generate a lot of graphs from one file, with headers between different data sets.
I have a tab-delimited plaintext file, formatted like this:

    Header: Boston city data
    Month    Data1    Data2    Data3
    1        1.5      9.1342   8.1231
    2        12.3     12.31    1.129
    3        (etc...)  

    Header: Chicago city data
    Month    Data1    Data2    Data3
    1        1.5      9.1342   8.1231
    2        12.3     12.31    1.129
    ...

I would like to create a graph of month vs Data1, month vs Data2, and month vs Data2, for each city.

I know in python, I could iterate through each line, do something different if the line starts with 'Header', and then somehow process the numbers. I would like to simply do this:

    for (data block starting with header) in inf:
        data = read.delim()
        barplot(data, main=header, ylab="Data1", xlab="Month")
        # repeat for Data2, Data3

but I'm not sure how to actually iterate through the file, or if I should just split up my file by city into lots of small files, then run through a list of small files to read.
