public void errorsScalingR(
			String fullFileName, 
			int maxMeasurements, 
			int minMeasurements,
			int[] nArray, 
			double d,
			double[] rArray) {
		
		
		double[][] dataPointsDistanceError = new double[rArray.length][nArray.length];
		double[][] dataPointsRSSError = new double[rArray.length][nArray.length];
		
		double[][] dataPointsDistanceTime = new double[rArray.length][nArray.length];
		double[][] dataPointsRSSTime = new double[rArray.length][nArray.length];
		
		double[] dataPointsAveragedError = new double[rArray.length];
		int[] dataPointsAveragedFit = new int[rArray.length];
		double[] dataPointsAveragedMissPercent = new double[rArray.length];
		
		int[] cellsSizes = new int[rArray.length];

		for(int i = 0; i < rArray.length; i++) {
			double currR = rArray[i];
			
			List<OpenCellIdCell> cells = parseCells(
					fullFileName,
					maxMeasurements,
					minMeasurements,
					currR);
			
			cellsSizes[i] = cells.size();
			
			for(int j = 0; j < nArray.length; j++) {
				int n = nArray[j];
				
				Quartet<Double, Double, Double, Double> data = errors(cells, n, d);
				
				double errorDistance = data.getValue0();
				double timeDistance = data.getValue1();
				double errorRSS = data.getValue2();
				double timeRSS = data.getValue3();
				
				dataPointsDistanceError[i][j] = errorDistance;
				dataPointsRSSError[i][j] = errorRSS;
				
				dataPointsDistanceTime[i][j] = timeDistance;
				dataPointsRSSTime[i][j] = timeRSS;
			}
			
			Triplet<Double, Integer, Double> averagedError = errorByAverage(cells);
			
			double errorAverage = averagedError.getValue0();
			int averageFit = averagedError.getValue1();
			double averageMissPercent = averagedError.getValue2();
//			System.out.printf("%d\t%.1f\n",averageFit,averageMissPercent);
			
			dataPointsAveragedError[i] = errorAverage;
			dataPointsAveragedFit[i] = averageFit;
			dataPointsAveragedMissPercent[i] = averageMissPercent;
		}
		
		System.out.printf("Cells\tMaxMeas\tMinMeas\td\tn\tr\terr_dist\ttime_dist\terr_RSS\ttime_RSS\terror_average\taverage_fit\taverage_miss\n");
		
		HashMap<double[], String> dataPointsMap = new HashMap<double[], String>();
		
		for(int j = 0; j < nArray.length; j++) {
			int n = nArray[j];
			
			double[] dataPointsErrorDistance = new double[rArray.length];
			double[] dataPointsErrorRSS = new double[rArray.length];
			
			for(int i = 0; i < rArray.length; i++) {
				
				int cellSize = cellsSizes[i];
				double r = rArray[i];
				double errorDistance = dataPointsDistanceError[i][j];
				double timeDistance = dataPointsDistanceTime[i][j];
				double errorRSS = dataPointsRSSError[i][j];
				double timeRSS = dataPointsRSSTime[i][j];
				double errorAverage = dataPointsAveragedError[i];
				int averageFit = dataPointsAveragedFit[i];
				double averageMiss = dataPointsAveragedMissPercent[i];
				
				System.out.printf("%d\t%d\t%d\t%.4f\t%d\t%.1f\t%.2f\t%.5f\t\t%.2f\t%.5f\t\t%.2f\t\t%d\t\t%.1f\n", cellSize, maxMeasurements, minMeasurements, d, n, r, errorDistance, timeDistance, errorRSS, timeRSS, errorAverage, averageFit, averageMiss);

				dataPointsErrorDistance[i] = errorDistance;
				dataPointsErrorRSS[i] = errorRSS;
			}
			
			dataPointsMap.put(dataPointsErrorDistance, "D-CTL");
			dataPointsMap.put(dataPointsErrorRSS, "RSS-CTL");
			
		}
		
		dataPointsMap.put(dataPointsAveragedError, "OpenCellID");
		
		String chartURL = Charts4J.errorChartScalingR(dataPointsMap, cellsSizes);
		System.out.println("\n"+chartURL);
		
	}