 	columnNumber = Int(cliColNum)-1
 } else {
 	cliColName = CommandLine.arguments[2]
+}
+
+
+// Load minimum sample time
+var minTime: Double? = nil
+if CommandLine.arguments.count > 3 {
+	minTime = Double(CommandLine.arguments[3])
+}
+
+var timeColumnNumber: Int? = nil
+var timeCliColName: String? = nil
+if CommandLine.arguments.count > 4 {
+	if let timeCliColNum = UInt(CommandLine.arguments[4]) {
+		timeColumnNumber = Int(timeCliColNum)-1
+	} else {
+		timeCliColName = CommandLine.arguments[4]
+	}
 }
 
 var statFiles: String

/*** ***/


guard CommandLine.arguments.count == 3 else {
	print("usage: \(CommandLine.arguments[0]) [list of data files] [column name or number]")
	exit(EXIT_FAILURE)
}

var columnNumber: Int? = nil
var cliColName: String? = nil

		columnNumber = colIndex
	}

	if timeColumnNumber == nil {
		let header = statFileLines.first!
		let colNames = header.components(separatedBy: "\t").filter({!$0.isEmpty})
		if let timeColIndex = colNames.index(where: {$0 == timeCliColName}) {
			timeColumnNumber = timeColIndex
		} else {
			timeColumnNumber = 0
		}
	}

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

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

		if minTime != nil && timeEntry < minTime! {
			continue statFileLoop
		}

		// Push the data into the measurement's samples
