 /*** ***/
 
 
-guard CommandLine.arguments.count == 3 else {
-	print("usage: \(CommandLine.arguments[0]) [list of data files] [column name or number]")
+guard 3...5 ~= CommandLine.arguments.count else {
+	print("usage: \(CommandLine.arguments[0]) [list of data files] [column name or number] [minimum time] [column name or number of time entry]")
 	exit(EXIT_FAILURE)
 }
+
 
 var columnNumber: Int? = nil
 var cliColName: String? = nil

		columnNumber = colIndex
	}

	// 3. Drop the first line (header)
	statFileLines.removeFirst()

	// 4. Run through the statFile lines
	for statFileLine in statFileLines {
		// Split each line by tabs
		let statFileLineColumns = statFileLine.components(separatedBy: "\t").filter({!$0.isEmpty})
		// First column is time index for the dictionary
		// 'columnNumber' column is the data we want
		guard let dataEntry = Double(statFileLineColumns[columnNumber!]) else {
					print("ERROR: Can't interpret data.")
					exit(EXIT_FAILURE)
		}

		// Push the data into the measurement's samples

/* This script takes a list of statistical data files containing tab-separated values,
 * and aggregates a specifed column so that it can be used for generating histograms.
 *
 * If a time, in seconds, is specified in as the third argument, only samples collected
 * after that (simulation) time will be included. This is helpful to exclude impulse stages.
 *
 * The fourth argument specifies the name or number of the column with the time data. 
 * Assumed to be the first column, if not provided.
 */

import Foundation
