Gnuplot allows for three dimensional datasets, which are a set of tables separated by empty lines, for instance:
54.32,16.17,7.42,4.28,3.09,2.11,1.66,1.22,0.99,0.82,7.9
54.63,15.50,8.53,5.31,3.75,1.66,1.14,0.83,0.94,0.52,7.18
56.49,16.67,6.38,3.69,2.80,1.45,1.12,0.89,1.12,0.89,8.50
56.35,16.26,7.76,3.57,2.62,1.89,1.05,1.15,0.63,1.05,7.66
53.79,16.19,6.47,4.57,3.47,1.74,1.95,1.37,1.00,0.74,8.73
55.63,16.28,7.87,3.72,2.48,1.99,1.40,1.19,0.70,1.08,7.65
54.09,15.76,7.96,4.70,2.77,2.21,1.27,1.27,0.66,1.11,8.19
53.79,16.19,6.47,4.57,3.47,1.74,1.95,1.37,1.00,0.74,8.73
...
This is for instance to show a dataset evolving through, for instance, time. In Gnuplot, you can then select which dataset (using it's index and the keyword, huh, index IIRC) you want to use for a given plot.
I've been using R, and up to now, I have been manually feeding it datasets one at a time, using the scan/table functions. Instead of having one big file with all the datasets in them, I have one file per dataset, and I create the tables one at a time.
Is there a (built-in, or very simple) way to read the aggregate datasets all at once, in such a way that I would have
dataset <- neatInput("my-aggregate-data")
dataset[1] # first data set
dataset[2] # second data set
...
or something similar?