Index: tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/FactoMineRCA.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/FactoMineRCA.java	(revision 2682)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/FactoMineRCA.java	(revision 2683)
@@ -36,24 +36,25 @@
 import org.txm.ca.core.messages.CACoreMessages;
 import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
 import org.txm.statsengine.core.StatException;
+import org.txm.statsengine.core.data.Vector;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.data.QuantitativeDataStructureImpl;
+import org.txm.statsengine.r.core.data.VectorImpl;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 
-// TODO: Auto-generated Javadoc
 /**
- * Access to the R implementation of the Correspondance Analysis.
+ * Access to the R implementation of the Correspondance Analysis of the FactoMineR library
  *
  * @author mdecorde
  */
 public class FactoMineRCA implements ICA {
-
+	
 	/** The singular values. */
 	private double[] eigenvalues = null;
 	
 	/** The singular values2. */
 	private double[] singularValues = null;
-
+	
 	/** The rowmass. */
 	private double[] rowmass = null;
 	
@@ -71,7 +72,7 @@
 	
 	/** The colinertia. */
 	private double[] colinertia = null;
-
+	
 	/** The rowcos2. */
 	private double[][] rowcos2 = null;
 	
@@ -83,21 +84,21 @@
 	
 	/** The colcontrib. */
 	private double[][] colcontrib = null;
-
+	
 	/** The rw. */
 	private final RWorkspace rw = RWorkspace.getRWorkspaceInstance();
 	
 	/** The symbol. */
 	private final String symbol = QuantitativeDataStructureImpl.createSymbole(FactoMineRCA.class);
-
+	
 	/** The rowscoords. */
 	private double[][] rowscoords;
-
+	
 	/** The colscoords. */
 	private double[][] colscoords;
-
-	private ILexicalTable table;	
 	
+	private ILexicalTable table;
+	
 	/**
 	 * Create a correspondence analysis on the given table. The correspondence analysis is computed as soon as the object is created.
 	 *
@@ -105,24 +106,46 @@
 	 * @throws StatException the stat exception
 	 */
 	public FactoMineRCA(ILexicalTable table) throws StatException {
-
+		
 		loadLibrary();
 		this.table = table;
 	}
 	
+	@Override
 	public void compute() throws StatException {
+		
+		// reset cache
+		rowscoords = null;
+		colscoords = null;
+		eigenvalues = null;
+		singularValues = null;
+		rowmass = null;
+		rowdist = null;
+		rowinertia = null;
+		colmass = null;
+		coldist = null;
+		colinertia = null;
+		rowcos2 = null;
+		rowcontrib = null;
+		colcos2 = null;
+		colcontrib = null;
+		
 		if (!rw.containsVariable(table.getSymbol())) {
 			throw new StatException(CACoreMessages.error_lexicalTableNotFoundInWorkspace);
 		}
 		try {
-			//rw.callFunctionAndAffect("FactoMineR:CA", new String[] { table.getSymbol() }, symbol); //$NON-NLS-1$
-			rw.eval(symbol+" <- FactoMineR::CA("+table.getSymbol()+", graph=FALSE)"); //$NON-NLS-1$ //$NON-NLS-2$
-		} catch (RWorkspaceException e) {
+			// rw.callFunctionAndAffect("FactoMineR:CA", new String[] { table.getSymbol() }, symbol); //$NON-NLS-1$
+			// rw.eval(symbol+" <- FactoMineR::CA("+table.getSymbol()+", graph=FALSE)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval(symbol + " <- FactoMineR::CA(" + table.getSymbol() + "[,colSums(" + table.getSymbol() + ") != 0], graph=FALSE)"); //$NON-NLS-1$ //$NON-NLS-2$
+			
+		}
+		catch (RWorkspaceException e) {
 			throw new StatException(NLS.bind(CACoreMessages.error_errorWhileComputingCAP0, e.getMessage()), e);
 		}
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getColContrib()
 	 */
 	@Override
@@ -132,17 +155,19 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "col$contrib"); //$NON-NLS-1$
 				colcontrib = sv.asDoubleMatrix();
 				// Arrays.sort(rowdist);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(NLS.bind(CACoreMessages.error_failedToGetContributionColumnP0, e.getMessage()), e);
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
+			}
+			catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return colcontrib;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getColCos2()
 	 */
 	@Override
@@ -152,16 +177,17 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "col$cos2"); //$NON-NLS-1$
 				colcos2 = sv.asDoubleMatrix();
 				// Arrays.sort(rowdist);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(NLS.bind(CACoreMessages.error_failedToGetCos2ColumnP0, e.getMessage()), e);
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
+			}
+			catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return colcos2;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -170,18 +196,20 @@
 	 */
 	@Override
 	public double[] getColDist() throws StatException {
-		if (coldist == null) 
-		{
+		if (coldist == null) {
 			double[][] colcoords = getColsCoords();
 			coldist = new double[colcoords.length];
-			for (int i = 0; i < colcoords.length; i++)
-				for (int c = 0; c < colcoords[i].length; c++)
+			for (int i = 0; i < colcoords.length; i++) {
+				for (int c = 0; c < colcoords[i].length; c++) {
 					coldist[i] += Math.pow(colcoords[i][c], 2);
+				}
+			}
 		}
 		return coldist;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getColsCoords()
 	 */
 	@Override
@@ -190,41 +218,41 @@
 			try {
 				REXP exp = rw.extractItemFromListByName(symbol, "col$coord"); //$NON-NLS-1$
 				colscoords = exp.asDoubleMatrix();
-
-				//System.out.println("Avant:");
-//				for (int i = 0; i < colscoords.length; i++)
-//				{
-//					for (int c = 0; c < colscoords[i].length; c++)
-//					{
-//						System.out.println(" "+colscoords[i][c]);
-//					}
-//					System.out.println();
-//				}
 				
+				// System.out.println("Avant:");
+				// for (int i = 0; i < colscoords.length; i++)
+				// {
+				// for (int c = 0; c < colscoords[i].length; c++)
+				// {
+				// System.out.println(" "+colscoords[i][c]);
+				// }
+				// System.out.println();
+				// }
+				
 				// multiply coords by sv
-//				this.getSingularValues();
-//				for (int i = 0; i < colscoords.length; i++)
-//					for (int c = 0; c < colscoords[i].length; c++)
-//						colscoords[i][c] = colscoords[i][c] * singularValues[c];
-//				
-//				System.out.println("Apres:");
-//				for (int i = 0; i < colscoords.length; i++)
-//				{
-//					for (int c = 0; c < colscoords[i].length; c++)
-//					{
-//						System.out.println(" "+colscoords[i][c]);
-//					}
-//					System.out.println();
-//				}
-						
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
+				// this.getSingularValues();
+				// for (int i = 0; i < colscoords.length; i++)
+				// for (int c = 0; c < colscoords[i].length; c++)
+				// colscoords[i][c] = colscoords[i][c] * singularValues[c];
+				//
+				// System.out.println("Apres:");
+				// for (int i = 0; i < colscoords.length; i++)
+				// {
+				// for (int c = 0; c < colscoords[i].length; c++)
+				// {
+				// System.out.println(" "+colscoords[i][c]);
+				// }
+				// System.out.println();
+				// }
+				
+			}
+			catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return colscoords;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -238,13 +266,14 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "col$contrib"); //$NON-NLS-1$
 				colinertia = RWorkspace.toDouble(sv);
 				// Arrays.sort(colinertia);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return colinertia;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -258,38 +287,42 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "call$marge.col"); //$NON-NLS-1$
 				colmass = RWorkspace.toDouble(sv);
 				// Arrays.sort(colmass);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return colmass;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getRowContrib()
 	 */
 	@Override
 	public double[][] getRowContrib() throws StatException {
-		//System.out.println("FACTO: getRowContrib");
+		// System.out.println("FACTO: getRowContrib");
 		if (rowcontrib == null) {
 			try {
 				REXP sv = rw.extractItemFromListByName(symbol, "row$contrib"); //$NON-NLS-1$
 				rowcontrib = sv.asDoubleMatrix();
-				for (int i = 0 ; i < rowcontrib.length ; i++)
-					for (int j = 0 ; j < rowcontrib[i].length ; j++)
-						rowcontrib[i][j] = rowcontrib[i][j] / 100.0; 
+				for (int i = 0; i < rowcontrib.length; i++)
+					for (int j = 0; j < rowcontrib[i].length; j++)
+						rowcontrib[i][j] = rowcontrib[i][j] / 100.0;
 				// Arrays.sort(rowdist);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(NLS.bind(CACoreMessages.error_failedToGetConstributionRowP0, e.getMessage()), e);
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
+			}
+			catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return rowcontrib;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getRowCos2()
 	 */
 	@Override
@@ -299,16 +332,17 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "row$cos2"); //$NON-NLS-1$
 				rowcos2 = sv.asDoubleMatrix();
 				// Arrays.sort(rowdist);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(NLS.bind(CACoreMessages.error_failedToGetCos2RowP0, e.getMessage()), e);
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
+			}
+			catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return rowcos2;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -317,18 +351,20 @@
 	 */
 	@Override
 	public double[] getRowDist() throws StatException {
-		if (rowdist == null)
-		{
+		if (rowdist == null) {
 			double[][] rowcoords = getRowsCoords();
 			rowdist = new double[rowcoords.length];
-			for (int i = 0; i < rowcoords.length; i++)
-				for (int c = 0; c < rowcoords[i].length; c++)
+			for (int i = 0; i < rowcoords.length; i++) {
+				for (int c = 0; c < rowcoords[i].length; c++) {
 					rowdist[i] += Math.pow(rowcoords[i][c], 2);
+				}
+			}
 		}
 		return rowdist;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getRowsCoords()
 	 */
 	@Override
@@ -338,26 +374,26 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "row$coord"); //$NON-NLS-1$
 				rowscoords = sv.asDoubleMatrix();
 				
-//				this.getSingularValues();
-//				//System.out.println("Apres:");
-//				for (int i = 0; i < rowscoords.length; i++)
-//				{
-//					for (int c = 0; c < rowscoords[i].length; c++)
-//					{
-//						rowscoords[i][c] = rowscoords[i][c] * singularValues[c];
-//				//		System.out.println(" "+rowscoords[i][c]);
-//					}
-//					//System.out.println();
-//				}
-						
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
+				// this.getSingularValues();
+				// //System.out.println("Apres:");
+				// for (int i = 0; i < rowscoords.length; i++)
+				// {
+				// for (int c = 0; c < rowscoords[i].length; c++)
+				// {
+				// rowscoords[i][c] = rowscoords[i][c] * singularValues[c];
+				// // System.out.println(" "+rowscoords[i][c]);
+				// }
+				// //System.out.println();
+				// }
+				
+			}
+			catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return rowscoords;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -371,13 +407,14 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "row$contrib"); //$NON-NLS-1$
 				rowinertia = RWorkspace.toDouble(sv);
 				// Arrays.sort(rowinertia);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return rowinertia;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -391,57 +428,65 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "call$marge.row"); //$NON-NLS-1$
 				rowmass = RWorkspace.toDouble(sv);
 				// Arrays.sort(rowmass);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return rowmass;
 	}
-
+	
 	/**
 	 * Get the singular values.
 	 *
 	 * @return the singular values
 	 * @throws StatException the stat exception
+	 * @throws REXPMismatchException
 	 */
 	@Override
-	public double[] getSingularValues() throws StatException {
+	public double[] getSingularValues() throws StatException, REXPMismatchException {
 		if (singularValues == null) {
 			getEigenvalues();
 			singularValues = new double[eigenvalues.length];
-			for(int i = 0 ; i < eigenvalues.length ; i++)
+			for (int i = 0; i < eigenvalues.length; i++) {
 				singularValues[i] = Math.pow(eigenvalues[i], 0.5);
+			}
 		}
 		return singularValues;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getSymbol()
 	 */
 	@Override
 	public String getSymbol() {
 		return symbol;
 	}
-
+	
 	/**
 	 * Gets the valeurs propres.
 	 *
 	 * @return the singular values pow 2
+	 * @throws RWorkspaceException
 	 * @throws StatException the stat exception
+	 * @throws REXPMismatchException
 	 */
 	@Override
-	public double[] getEigenvalues() throws StatException {
+	public double[] getEigenvalues() throws RWorkspaceException, REXPMismatchException {
 		if (eigenvalues == null) {
-			try {
-				REXP sv = rw.eval(symbol+"$eig$eigenvalue"); //$NON-NLS-1$
-				eigenvalues = RWorkspace.toDouble(sv);
-				// remove last singular value
-				if (eigenvalues.length == table.getNColumns())
-					eigenvalues = Arrays.copyOfRange(eigenvalues, 0, eigenvalues.length -1);
-				// Arrays.sort(singularValues);
-			} catch (RWorkspaceException e) {
-				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
+			// try {
+			REXP sv = rw.eval(symbol + "$eig$eigenvalue"); //$NON-NLS-1$
+			eigenvalues = RWorkspace.toDouble(sv);
+			// remove last singular value
+			if (eigenvalues.length == this.getColumnsCount()) {
+				eigenvalues = Arrays.copyOfRange(eigenvalues, 0, eigenvalues.length - 1);
 			}
+			// Arrays.sort(singularValues);
+			// }
+			// catch (Exception|StatException e) {
+			// throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
+			// }
 		}
 		return eigenvalues;
 		
@@ -455,23 +500,25 @@
 	 */
 	@Override
 	public String getEigenvaluesRSymbol() throws StatException {
-		return symbol+"$eig$eigenvalue";
+		return symbol + "$eig$eigenvalue";
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#loadLibrary()
 	 */
 	@Override
-	public boolean loadLibrary(){
+	public boolean loadLibrary() {
 		try {
 			rw.voidEval("library(FactoMineR)"); //$NON-NLS-1$
-		} catch (RWorkspaceException e) {
+		}
+		catch (RWorkspaceException e) {
 			System.out.println(NLS.bind(CACoreMessages.error_canNotLoadCALibraryP0, e));
 			return false;
 		}
 		return true;
 	}
-
+	
 	/**
 	 * Draw in the given file a plot of the factorial map.
 	 *
@@ -485,45 +532,55 @@
 	public boolean toTxt(File file, String encoding, String colseparator, String txtseparator) {
 		try {
 			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
-			rw.eval("sink(file=\"" + file.getAbsolutePath().replace("\\", "\\\\")+"\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			rw.eval("print("+symbol+")"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("sink(file=\"" + file.getAbsolutePath().replace("\\", "\\\\") + "\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			rw.eval("print(" + symbol + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$eig)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$eig)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$col)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$col)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$col$coord)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$col$coord)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$col$cos2)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$col$cos2)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$col$contrib)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$col$contrib)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$row)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$row)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$row$coord)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$row$coord)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$row$cos2)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$row$cos2)"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			rw.eval("print("+symbol+"$row$contrib)"); //$NON-NLS-1$ //$NON-NLS-2$
-//			rw.eval("print("+symbol+"$call)"); //$NON-NLS-1$ //$NON-NLS-2$
-//			rw.eval("print("+symbol+"$call$marge.col)"); //$NON-NLS-1$ //$NON-NLS-2$
-//			rw.eval("print("+symbol+"$call$marge.row)"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("print(" + symbol + "$row$contrib)"); //$NON-NLS-1$ //$NON-NLS-2$
+			// rw.eval("print("+symbol+"$call)"); //$NON-NLS-1$ //$NON-NLS-2$
+			// rw.eval("print("+symbol+"$call$marge.col)"); //$NON-NLS-1$ //$NON-NLS-2$
+			// rw.eval("print("+symbol+"$call$marge.row)"); //$NON-NLS-1$ //$NON-NLS-2$
 			rw.eval("sink()"); //$NON-NLS-1$
-		} catch (StatException e) {
+		}
+		catch (StatException e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 			return false;
 		}
 		return true;
 	}
 	
+	@Override
+	public int getRowsCount() throws RWorkspaceException, REXPMismatchException {
+		return rw.eval("length(" + this.symbol + "$call$marge.row)").asInteger();
+	}
 	
 	@Override
-	public int getRowsCount() {
-		return this.table.getRowsCount();
+	public int getColumnsCount() throws RWorkspaceException, REXPMismatchException {
+		return rw.eval("length(" + this.symbol + "$call$marge.col)").asInteger();
 	}
-
+	
 	@Override
-	public int getColumnsCount() {
-		return this.table.getColumnsCount();
+	public Vector getColNames() throws RWorkspaceException {
+		return new VectorImpl("names(" + this.symbol + "$call$marge.col)");
 	}
+	
+	@Override
+	public Vector getRowNames() throws RWorkspaceException {
+		return new VectorImpl("names(" + this.symbol + "$call$marge.row)");
+	}
 }
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/ICA.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/ICA.java	(revision 2682)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/ICA.java	(revision 2683)
@@ -29,7 +29,10 @@
 
 import java.io.File;
 
+import org.rosuda.REngine.REXPMismatchException;
 import org.txm.statsengine.core.StatException;
+import org.txm.statsengine.core.data.Vector;
+import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 
 // TODO: Auto-generated Javadoc
 /**
@@ -46,7 +49,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public double[][] getColContrib() throws StatException;
-
+	
 	/**
 	 * Gets the col cos2.
 	 *
@@ -54,7 +57,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public double[][] getColCos2() throws StatException;
-
+	
 	/**
 	 * Gets the col dist.
 	 *
@@ -62,14 +65,14 @@
 	 * @throws StatException the stat exception
 	 */
 	public double[] getColDist() throws StatException;
-
+	
 	/**
 	 * Gets the cols coords.
 	 *
 	 * @return the cols coords
 	 */
 	public double[][] getColsCoords();
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -77,7 +80,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public double[] getColsInertia() throws StatException;
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -85,7 +88,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public double[] getColsMass() throws StatException;
-
+	
 	/**
 	 * Gets the row contrib.
 	 *
@@ -93,7 +96,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public double[][] getRowContrib() throws StatException;
-
+	
 	/**
 	 * Gets the row cos2.
 	 *
@@ -138,38 +141,44 @@
 	 *
 	 * @return the singular values
 	 * @throws StatException the stat exception
+	 * @throws REXPMismatchException
 	 */
-	public double[] getSingularValues() throws StatException;
+	public double[] getSingularValues() throws StatException, REXPMismatchException;
 	
 	
 	/**
 	 * Gets the number of rows.
+	 * 
 	 * @return the number of rows
+	 * @throws REXPMismatchException
+	 * @throws RWorkspaceException
 	 */
-	public int getRowsCount();
-
+	public int getRowsCount() throws RWorkspaceException, REXPMismatchException;
 	
+	
 	/**
 	 * Gets the number of columns.
+	 * 
 	 * @return the number of columns
 	 */
-	public int getColumnsCount();
-
+	public int getColumnsCount() throws RWorkspaceException, REXPMismatchException;
 	
+	
 	/**
 	 * Gets the symbol.
 	 *
 	 * @return the symbol
 	 */
 	public String getSymbol();
-
+	
 	/**
 	 * Gets the valeurs propres.
 	 *
 	 * @return the valeurs propres
 	 * @throws StatException the stat exception
+	 * @throws REXPMismatchException
 	 */
-	public double[] getEigenvalues() throws StatException;
+	public double[] getEigenvalues() throws StatException, REXPMismatchException;
 	
 	/**
 	 * Gets the valeurs propres.
@@ -178,18 +187,16 @@
 	 * @throws StatException the stat exception
 	 */
 	public String getEigenvaluesRSymbol() throws StatException;
-
+	
 	/**
 	 * Load library.
 	 *
 	 * @return true, if successful
 	 */
 	public boolean loadLibrary();
-
-
-
+	
 	/**
-	 * Draw in the given file a plot of the factorial map.
+	 * Raw export of the CA data.
 	 *
 	 * @param file the file
 	 * @param encoding the encoding
@@ -198,4 +205,8 @@
 	 * @return true, if successful
 	 */
 	public boolean toTxt(File file, String encoding, String colseparator, String txtseparator);
+	
+	public Vector getColNames() throws RWorkspaceException;
+	
+	public Vector getRowNames() throws RWorkspaceException;
 }
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/CA.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/CA.java	(revision 2682)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/CA.java	(revision 2683)
@@ -34,6 +34,7 @@
 import org.txm.ca.core.messages.CACoreMessages;
 import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
 import org.txm.statsengine.core.StatException;
+import org.txm.statsengine.core.data.Vector;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.data.QuantitativeDataStructureImpl;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
@@ -41,10 +42,13 @@
 /**
  * Access to the R implementation of the Correspondance Analysis.
  *
+ * WARNING: the "CA" pacakge is not shipped in TXM 0.8.X ; this class does not manage changes of the table object ; does not manage empty row or col
+ *
  * @author sloiseau, mdecorde, sjacquot
  */
-public class CA implements ICA	{
-
+@Deprecated
+public class CA implements ICA {
+	
 	/** The singular values. */
 	private double[] singularValues = null;
 	
@@ -65,7 +69,7 @@
 	
 	/** The rowcontrib. */
 	private double[][] rowcontrib = null;
-
+	
 	/** The colmass. */
 	private double[] colmass = null;
 	
@@ -80,16 +84,16 @@
 	
 	/** The colcontrib. */
 	private double[][] colcontrib = null;
-
+	
 	/** The rw. */
 	private final RWorkspace rw = RWorkspace.getRWorkspaceInstance();
 	
 	/** The symbol. */
 	private final String symbol = QuantitativeDataStructureImpl.createSymbole(CA.class);
-
+	
 	/** The rowscoords. */
 	private double[][] rowscoords;
-
+	
 	/** The colscoords. */
 	private double[][] colscoords;
 	
@@ -108,47 +112,47 @@
 	public CA(ILexicalTable table) throws StatException {
 		
 		
-
+		
 		loadLibrary();
 		this.table = table;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getColContrib()
 	 */
 	@Override
 	public double[][] getColContrib() throws StatException {
-
+		
 		double[][] colcoords = getColsCoords();
 		double[] sv = this.getEigenvalues();
 		double[] mass = this.getColsMass();
-
+		
 		colcontrib = new double[colcoords.length][3];
-
+		
 		for (int i = 0; i < colcoords.length; i++) {
-			for(int c = 0 ; c < 3 ; c++)
-			{
+			for (int c = 0; c < 3; c++) {
 				colcontrib[i][c] = 100.0 * mass[i] * (colcoords[i][c] * colcoords[i][c]) / (sv[c]);
 			}
 		}
 		return colcontrib;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getColCos2()
 	 */
 	@Override
 	public double[][] getColCos2() {
-		if (colcos2 == null)
-		{
+		if (colcos2 == null) {
 			double[][] colcoords = getColsCoords();
 			double[] dist = getColDist();
 			colcos2 = new double[colcoords.length][3];
-
+			
 			for (int i = 0; i < colcoords.length; i++) {
-
+				
 				double distt = dist[i];
-
+				
 				colcos2[i][0] = Math.pow(colcoords[i][0], 2) / distt;
 				colcos2[i][1] = Math.pow(colcoords[i][1], 2) / distt;
 				colcos2[i][2] = Math.pow(colcoords[i][2], 2) / distt;
@@ -156,14 +160,14 @@
 		}
 		return colcos2;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getColDist()
 	 */
 	@Override
 	public double[] getColDist() {
-		if (coldist == null)
-		{
+		if (coldist == null) {
 			double[][] colcoords = getColsCoords();
 			coldist = new double[colcoords.length];
 			for (int i = 0; i < colcoords.length; i++)
@@ -172,8 +176,9 @@
 		}
 		return coldist;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getColsCoords()
 	 */
 	@Override
@@ -182,20 +187,21 @@
 			try {
 				REXP exp = rw.extractItemFromListByName(symbol, "colcoord"); //$NON-NLS-1$
 				colscoords = exp.asDoubleMatrix();
-
+				
 				// multiply coords by sv
 				this.getSingularValues();
 				for (int i = 0; i < colscoords.length; i++)
 					for (int c = 0; c < colscoords[i].length; c++)
 						colscoords[i][c] = colscoords[i][c] * singularValues[c];
-			} catch (Exception e) {
+			}
+			catch (Exception e) {
 				// TODO Auto-generated catch block
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return colscoords;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -208,13 +214,14 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "coldist"); //$NON-NLS-1$
 				coldist = RWorkspace.toDouble(sv);
 				// Arrays.sort(coldist);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return coldist;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -228,13 +235,14 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "colinertia"); //$NON-NLS-1$
 				colinertia = RWorkspace.toDouble(sv);
 				// Arrays.sort(colinertia);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return colinertia;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -248,52 +256,53 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "colmass"); //$NON-NLS-1$
 				colmass = RWorkspace.toDouble(sv);
 				// Arrays.sort(colmass);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return colmass;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getRowContrib()
 	 */
 	@Override
 	public double[][] getRowContrib() throws StatException {
 		if (rowcontrib != null)
 			return rowcontrib;
-
+		
 		double[][] rowcoords = getRowsCoords();
 		double[] sv = this.getEigenvalues();
 		double[] mass = this.getRowsMass();
-
+		
 		rowcontrib = new double[rowcoords.length][3];
-
+		
 		for (int i = 0; i < rowcoords.length; i++) {
-			for(int c = 0 ; c <3 ; c++)
-			{
+			for (int c = 0; c < 3; c++) {
 				rowcontrib[i][c] = 100.0 * mass[i] * (rowcoords[i][c] * rowcoords[i][c]) / (sv[c]);
 			}
 		}
 		return rowcontrib;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getRowCos2()
 	 */
 	@Override
 	public double[][] getRowCos2() {
-		if (rowcos2 == null)
-		{
+		if (rowcos2 == null) {
 			double[][] rowcoords = getRowsCoords();
 			double[] dist = getRowDist();
-
+			
 			rowcos2 = new double[rowcoords.length][3];
-
+			
 			for (int i = 0; i < rowcoords.length; i++) {
-
+				
 				double distt = dist[i];
-
+				
 				rowcos2[i][0] = Math.pow(rowcoords[i][0], 2) / distt;
 				rowcos2[i][1] = Math.pow(rowcoords[i][1], 2) / distt;
 				rowcos2[i][2] = Math.pow(rowcoords[i][2], 2) / distt;
@@ -301,14 +310,14 @@
 		}
 		return rowcos2;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getRowDist()
 	 */
 	@Override
 	public double[] getRowDist() {
-		if (rowdist == null)
-		{
+		if (rowdist == null) {
 			double[][] rowcoords = getRowsCoords();
 			rowdist = new double[rowcoords.length];
 			for (int i = 0; i < rowcoords.length; i++)
@@ -317,8 +326,9 @@
 		}
 		return rowdist;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getRowsCoords()
 	 */
 	@Override
@@ -327,19 +337,20 @@
 			try {
 				REXP sv = rw.extractItemFromListByName(symbol, "rowcoord"); //$NON-NLS-1$
 				rowscoords = sv.asDoubleMatrix();
-
+				
 				this.getSingularValues();
 				for (int i = 0; i < rowscoords.length; i++)
 					for (int c = 0; c < rowscoords[i].length; c++)
 						rowscoords[i][c] = rowscoords[i][c] * singularValues[c];
-			} catch (Exception e) {
+			}
+			catch (Exception e) {
 				// TODO Auto-generated catch block
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
 		return rowscoords;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -352,13 +363,14 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "rowdist"); //$NON-NLS-1$
 				rowdist = RWorkspace.toDouble(sv);
 				// Arrays.sort(rowdist);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return rowdist;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -372,13 +384,14 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "rowinertia"); //$NON-NLS-1$
 				rowinertia = RWorkspace.toDouble(sv);
 				// Arrays.sort(rowinertia);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return rowinertia;
 	}
-
+	
 	/**
 	 * Get the rows mass.
 	 *
@@ -392,13 +405,14 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "rowmass"); //$NON-NLS-1$
 				rowmass = RWorkspace.toDouble(sv);
 				// Arrays.sort(rowmass);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
 		return rowmass;
 	}
-
+	
 	/**
 	 * Get the singular values.
 	 *
@@ -412,7 +426,8 @@
 				REXP sv = rw.extractItemFromListByName(symbol, "sv"); //$NON-NLS-1$
 				singularValues = RWorkspace.toDouble(sv);
 				// Arrays.sort(singularValues);
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				throw new StatException(CACoreMessages.bind(CACoreMessages.error_unableToExtractSingularValuesP0, e.getMessage()), e);
 			}
 		}
@@ -430,7 +445,7 @@
 		if (singularValues2 == null) {
 			getSingularValues();
 			singularValues2 = new double[singularValues.length];
-			for(int i = 0 ; i < singularValues.length ; i++)
+			for (int i = 0; i < singularValues.length; i++)
 				singularValues2[i] = Math.pow(singularValues[i], 2);
 		}
 		return singularValues2;
@@ -438,35 +453,38 @@
 	
 	@Override
 	public String getEigenvaluesRSymbol() throws StatException {
-		return symbol+"$sv";
+		return symbol + "$sv";
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#getSymbol()
 	 */
 	@Override
 	public String getSymbol() {
 		return symbol;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.stat.engine.r.function.ICA#loadLibrary()
 	 */
 	@Override
 	public boolean loadLibrary() {
 		try {
 			rw.voidEval("library(ca)"); //$NON-NLS-1$
-		} catch (RWorkspaceException e) {
+		}
+		catch (RWorkspaceException e) {
 			System.out.println(NLS.bind(CACoreMessages.error_canNotLoadCALibraryP0, e));
 			return false;
 		}
 		return true;
 	}
-
-
-
+	
+	
+	
 	/**
-	 * Draw in the given file a plot of the factorial map.
+	 * Raw export of the R data
 	 *
 	 * @param file the file
 	 * @param encoding the encoding
@@ -478,27 +496,18 @@
 	public boolean toTxt(File file, String encoding, String colseparator, String txtseparator) {
 		try {
 			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
-			rw.eval("sink(file=\"" + file.getAbsolutePath().replace("\\", "\\\\")+"\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			rw.eval("print("+symbol+")"); //$NON-NLS-1$ //$NON-NLS-2$
+			rw.eval("sink(file=\"" + file.getAbsolutePath().replace("\\", "\\\\") + "\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			rw.eval("print(" + symbol + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 			rw.eval("sink()"); //$NON-NLS-1$
-		} catch (StatException e) {
+		}
+		catch (StatException e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 			return false;
 		}
 		return true;
 	}
-
+	
 	@Override
-	public int getRowsCount() {
-		return this.table.getRowsCount();
-	}
-
-	@Override
-	public int getColumnsCount() {
-		return this.table.getColumnsCount();
-	}
-
-	@Override
 	public void compute() throws StatException {
 		
 		if (!rw.containsVariable(table.getSymbol())) {
@@ -507,8 +516,29 @@
 		try {
 			rw.callFunctionAndAffect(
 					"ca", new String[] { table.getSymbol() }, symbol); //$NON-NLS-1$
-		} catch (RWorkspaceException e) {
+		}
+		catch (RWorkspaceException e) {
 			throw new StatException(NLS.bind(CACoreMessages.error_errorWhileComputingCAP0, e.getMessage()), e);
 		}
 	}
+	
+	@Override
+	public int getRowsCount() {
+		return this.table.getRowsCount();
+	}
+	
+	@Override
+	public int getColumnsCount() {
+		return this.table.getColumnsCount();
+	}
+	
+	@Override
+	public Vector getColNames() throws RWorkspaceException {
+		return table.getColNames();
+	}
+	
+	@Override
+	public Vector getRowNames() throws RWorkspaceException {
+		return table.getRowNames();
+	}
 }
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java	(revision 2682)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java	(revision 2683)
@@ -35,6 +35,7 @@
 import java.util.List;
 
 import org.eclipse.osgi.util.NLS;
+import org.rosuda.REngine.REXPMismatchException;
 import org.txm.ca.core.messages.CACoreMessages;
 import org.txm.ca.core.preferences.CAPreferences;
 import org.txm.ca.core.statsengine.r.functions.FactoMineRCA;
@@ -175,7 +176,7 @@
 	protected boolean __compute(TXMProgressMonitor monitor) throws Exception {
 		
 		try {
-			if (this.getLexicalTable().getNRows() == 0) {
+			if (this.getLexicalTable().getNRows() == 0 || this.getLexicalTable().getNColumns() == 0) {
 				Log.warning("** Empty Lexical table. Computing aborted.");
 				return false;
 			}
@@ -188,7 +189,6 @@
 			this.rowtitles = null;
 			this.rowtabledata = null;
 			
-			
 			try {
 				if (this.getCA() != null) {
 					RWorkspace.getRWorkspaceInstance().removeVariableFromWorkspace(this.getCA().getSymbol());
@@ -378,7 +378,7 @@
 	 */
 	public String[] getColNames() throws StatException {
 		if (colnames == null) {
-			colnames = getLexicalTable().getColNames().asStringsArray();
+			colnames = this.getCA().getColNames().asStringsArray();
 		}
 		return colnames;
 	}
@@ -426,8 +426,10 @@
 	 * Gets the number of columns.
 	 * 
 	 * @return the number of columns
+	 * @throws REXPMismatchException
+	 * @throws RWorkspaceException
 	 */
-	public int getColumnsCount() {
+	public int getColumnsCount() throws RWorkspaceException, REXPMismatchException {
 		return this.r_ca.getColumnsCount();
 	}
 	
@@ -554,8 +556,9 @@
 	 * Gets the col all infos as Array of arrays.
 	 *
 	 * @return the col infos
+	 * @throws REXPMismatchException
 	 */
-	public Object[] getColInfos() {
+	public Object[] getColInfos() throws REXPMismatchException {
 		
 		if (coltabledata != null) {
 			return coltabledata.toArray();
@@ -679,8 +682,10 @@
 	 * Gets the number of rows.
 	 * 
 	 * @return the number of rows
+	 * @throws REXPMismatchException
+	 * @throws RWorkspaceException
 	 */
-	public int getRowsCount() {
+	public int getRowsCount() throws RWorkspaceException, REXPMismatchException {
 		return this.r_ca.getRowsCount();
 	}
 	
@@ -812,8 +817,9 @@
 	 *
 	 * @return the singular values
 	 * @throws StatException the stat exception
+	 * @throws REXPMismatchException
 	 */
-	public double[] getSingularValues() throws StatException {
+	public double[] getSingularValues() throws StatException, REXPMismatchException {
 		return r_ca.getSingularValues();
 	}
 	
@@ -821,8 +827,9 @@
 	 * Get the singular values infos as List of Lists
 	 *
 	 * @return the singular values infos
+	 * @throws REXPMismatchException
 	 */
-	public List<List<Object>> getSingularValuesInfos() {
+	public List<List<Object>> getSingularValuesInfos() throws REXPMismatchException {
 		List<List<Object>> svtabledata = new ArrayList<>();
 		
 		double[] sv = null;
@@ -875,8 +882,9 @@
 	 *
 	 * @return the valeurs propres
 	 * @throws StatException the stat exception
+	 * @throws REXPMismatchException
 	 */
-	public double[] getValeursPropres() throws StatException {
+	public double[] getValeursPropres() throws StatException, REXPMismatchException {
 		return r_ca.getEigenvalues();
 	}
 	
@@ -885,8 +893,9 @@
 	 *
 	 * @return the valeurs propres sum
 	 * @throws StatException the stat exception
+	 * @throws REXPMismatchException
 	 */
-	public double getValeursPropresSum() throws StatException {
+	public double getValeursPropresSum() throws StatException, REXPMismatchException {
 		double sum = 0;
 		for (double d : getValeursPropres()) {
 			sum += d;
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCCAChartCreator.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCCAChartCreator.java	(revision 2682)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCCAChartCreator.java	(revision 2683)
@@ -15,6 +15,7 @@
 import org.jfree.chart.plot.PlotOrientation;
 import org.jfree.chart.plot.XYPlot;
 import org.jfree.chart.ui.TextAnchor;
+import org.rosuda.REngine.REXPMismatchException;
 import org.txm.ca.core.chartsengine.base.CAChartCreator;
 import org.txm.ca.core.chartsengine.base.Utils;
 import org.txm.ca.core.chartsengine.jfreechart.datasets.CAXYDataset;
@@ -36,43 +37,43 @@
  *
  */
 public class JFCCAChartCreator extends JFCChartCreator implements CAChartCreator {
-
+	
 	@Override
 	public JFreeChart createChart(ChartResult result) {
-
+		
 		CA ca = (CA) result;
-		JFreeChart chart  = null;
-
+		JFreeChart chart = null;
+		
 		try {
-			//CAXYDataset dataset = new CAXYDataset(ca);
-
-			chart = ChartFactory.createScatterPlot(Utils.createCAFactorialMapChartTitle(ca), 
-					"", "", null, PlotOrientation.VERTICAL, 
+			// CAXYDataset dataset = new CAXYDataset(ca);
+			
+			chart = ChartFactory.createScatterPlot(Utils.createCAFactorialMapChartTitle(ca),
+					"", "", null, PlotOrientation.VERTICAL,
 					CAPreferences.getInstance().getBoolean(ChartsEnginePreferences.SHOW_LEGEND), false, false);
-
+			
 			// Custom renderer
 			chart.getXYPlot().setRenderer(new CAItemSelectionRenderer(ca, chart));
 		}
-		catch(Exception e) {
+		catch (Exception e) {
 			Log.severe("Can't create CA factorial map scatter plot" + e);
 			return null;
 		}
-
 		
-		return chart;		
 		
+		return chart;
+		
 	}
-
+	
 	@Override
 	public void updateChart(ChartResult result) {
-
+		
 		CA ca = (CA) result;
 		
-		JFreeChart chart = (JFreeChart)result.getChart();
-
+		JFreeChart chart = (JFreeChart) result.getChart();
+		
 		// freeze rendering while computing
 		chart.setNotify(false);
-
+		
 		try {
 			chart.getXYPlot().setDataset(new CAXYDataset(ca));
 		}
@@ -81,7 +82,7 @@
 			e.printStackTrace();
 		}
 		
-		CAItemSelectionRenderer renderer = (CAItemSelectionRenderer) chart.getXYPlot().getRenderer(); 
+		CAItemSelectionRenderer renderer = (CAItemSelectionRenderer) chart.getXYPlot().getRenderer();
 		
 		renderer.setSeriesVisible(0, ca.isShowVariables());
 		renderer.setSeriesVisible(1, ca.isShowIndividuals());
@@ -91,277 +92,283 @@
 		
 		// Create the limits border
 		this.createCAFactorialMapChartLimitsBorder(chart);
-
+		
 		this.updateChartCAFactorialMapSetDimensions(ca);
 		
-//        
-        // Draw the point shapes and the item labels
-        if(ca.isShowPointShapes())	{
-            
-        	renderer.setSeriesItemLabelPaint(0, renderer.getDefaultItemLabelPaint());
-            renderer.setSeriesItemLabelPaint(1, renderer.getDefaultItemLabelPaint());
-            
-        	// Labels position
-        	ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER, TextAnchor.BOTTOM_CENTER, 0.0);
-        	renderer.setDefaultPositiveItemLabelPosition(position);
-        	renderer.setDefaultNegativeItemLabelPosition(position);
-
-        	renderer.setItemLabelAnchorOffset(1);
-            
-        }
-        // Draw only the item labels
-        else	{
-        	
-        	// Labels colors
-        	Color rowsColor = (Color) renderer.getSeriesPaint(0);
-        	rowsColor = new Color(rowsColor.getRed(), rowsColor.getGreen(), rowsColor.getBlue(), 235);
-        	Color colsColor = (Color) renderer.getSeriesPaint(1);
-        	colsColor = new Color(colsColor.getRed(), colsColor.getGreen(), colsColor.getBlue(), 235);
-            renderer.setSeriesItemLabelPaint(0, rowsColor);
-            renderer.setSeriesItemLabelPaint(1, colsColor);
-            
-        	// Labels position
-        	ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER, TextAnchor.CENTER, 0.0);
-        	renderer.setDefaultPositiveItemLabelPosition(position);
-        	renderer.setDefaultNegativeItemLabelPosition(position);
-            
-            renderer.setItemLabelAnchorOffset(0);
-        }
-
+		//
+		// Draw the point shapes and the item labels
+		if (ca.isShowPointShapes()) {
+			
+			renderer.setSeriesItemLabelPaint(0, renderer.getDefaultItemLabelPaint());
+			renderer.setSeriesItemLabelPaint(1, renderer.getDefaultItemLabelPaint());
+			
+			// Labels position
+			ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER, TextAnchor.BOTTOM_CENTER, 0.0);
+			renderer.setDefaultPositiveItemLabelPosition(position);
+			renderer.setDefaultNegativeItemLabelPosition(position);
+			
+			renderer.setItemLabelAnchorOffset(1);
+			
+		}
+		// Draw only the item labels
+		else {
+			
+			// Labels colors
+			Color rowsColor = (Color) renderer.getSeriesPaint(0);
+			rowsColor = new Color(rowsColor.getRed(), rowsColor.getGreen(), rowsColor.getBlue(), 235);
+			Color colsColor = (Color) renderer.getSeriesPaint(1);
+			colsColor = new Color(colsColor.getRed(), colsColor.getGreen(), colsColor.getBlue(), 235);
+			renderer.setSeriesItemLabelPaint(0, rowsColor);
+			renderer.setSeriesItemLabelPaint(1, colsColor);
+			
+			// Labels position
+			ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER, TextAnchor.CENTER, 0.0);
+			renderer.setDefaultPositiveItemLabelPosition(position);
+			renderer.setDefaultNegativeItemLabelPosition(position);
+			
+			renderer.setItemLabelAnchorOffset(0);
+		}
+		
 		super.updateChart(result);
-    	
-    	// FIXME
-    //	this.getChartsEngine().squareOffGraph((JFreeChart) chart, 200, 200d);
-
+		
+		// FIXME
+		// this.getChartsEngine().squareOffGraph((JFreeChart) chart, 200, 200d);
+		
 	}
-
-
 	
+	
+	
 	/**
 	 * Add some borders to the limits of the specified XY plot.
+	 * 
 	 * @param plot
 	 */
-	public void createCAFactorialMapChartLimitsBorder(JFreeChart chart)	{
-
+	public void createCAFactorialMapChartLimitsBorder(JFreeChart chart) {
+		
 		XYPlot plot = chart.getXYPlot();
-
+		
 		// Remove all existent annotations
 		plot.clearAnnotations();
-//		for(int i = plot.getAnnotations().size() - 1; i >= 0; i--) {
-//			plot.removeAnnotation((XYAnnotation) plot.getAnnotations().get(i));
-//		}
-
-
-        // Gets the extreme coordinates values
+		// for(int i = plot.getAnnotations().size() - 1; i >= 0; i--) {
+		// plot.removeAnnotation((XYAnnotation) plot.getAnnotations().get(i));
+		// }
+		
+		
+		// Gets the extreme coordinates values
 		double minX = 0, maxX = 0, minY = 0, maxY = 0;
-
+		
 		// FIXME: new version
-//		minX = plot.getDataRange(plot.getDomainAxis()).getLowerBound();
-//		maxX = plot.getDataRange(plot.getDomainAxis()).getUpperBound();
-//
-//		minY = plot.getDataRange(plot.getRangeAxis()).getLowerBound();
-//		maxY = plot.getDataRange(plot.getRangeAxis()).getUpperBound();
-
+		// minX = plot.getDataRange(plot.getDomainAxis()).getLowerBound();
+		// maxX = plot.getDataRange(plot.getDomainAxis()).getUpperBound();
+		//
+		// minY = plot.getDataRange(plot.getRangeAxis()).getLowerBound();
+		// maxY = plot.getDataRange(plot.getRangeAxis()).getUpperBound();
+		
 		// FIXME: old version, to remove when new version will be validated
 		// Rows
-		if(plot.getRenderer().isSeriesVisible(0))	{
-			minX = ((CAXYDataset)plot.getDataset()).getMinX(0);
+		if (plot.getRenderer().isSeriesVisible(0)) {
+			minX = ((CAXYDataset) plot.getDataset()).getMinX(0);
 		}
 		// Cols
-		if(plot.getRenderer().isSeriesVisible(1))	{
-			double tmpMinX = ((CAXYDataset)plot.getDataset()).getMinX(1);
-			if(tmpMinX < minX)	{
+		if (plot.getRenderer().isSeriesVisible(1)) {
+			double tmpMinX = ((CAXYDataset) plot.getDataset()).getMinX(1);
+			if (tmpMinX < minX) {
 				minX = tmpMinX;
 			}
 		}
-
+		
 		// Rows
-		if(plot.getRenderer().isSeriesVisible(0))	{
-			maxX = ((CAXYDataset)plot.getDataset()).getMaxX(0);
+		if (plot.getRenderer().isSeriesVisible(0)) {
+			maxX = ((CAXYDataset) plot.getDataset()).getMaxX(0);
 		}
 		// Cols
-		if(plot.getRenderer().isSeriesVisible(1))	{
-			double tmpMaxX = ((CAXYDataset)plot.getDataset()).getMaxX(1);
-			if(tmpMaxX > maxX)	{
+		if (plot.getRenderer().isSeriesVisible(1)) {
+			double tmpMaxX = ((CAXYDataset) plot.getDataset()).getMaxX(1);
+			if (tmpMaxX > maxX) {
 				maxX = tmpMaxX;
 			}
 		}
-
+		
 		// Rows
-		if(plot.getRenderer().isSeriesVisible(0))	{
-			minY = ((CAXYDataset)plot.getDataset()).getMinY(0);
+		if (plot.getRenderer().isSeriesVisible(0)) {
+			minY = ((CAXYDataset) plot.getDataset()).getMinY(0);
 		}
 		// Cols
-		if(plot.getRenderer().isSeriesVisible(1))	{
-			double tmpMinY = ((CAXYDataset)plot.getDataset()).getMinY(1);
-			if(tmpMinY < minY)	{
+		if (plot.getRenderer().isSeriesVisible(1)) {
+			double tmpMinY = ((CAXYDataset) plot.getDataset()).getMinY(1);
+			if (tmpMinY < minY) {
 				minY = tmpMinY;
 			}
 		}
-
+		
 		// Rows
-		if(plot.getRenderer().isSeriesVisible(0))	{
-			maxY = ((CAXYDataset)plot.getDataset()).getMaxY(0);
+		if (plot.getRenderer().isSeriesVisible(0)) {
+			maxY = ((CAXYDataset) plot.getDataset()).getMaxY(0);
 		}
 		// Cols
-		if(plot.getRenderer().isSeriesVisible(1))	{
-			double tmpMaxY = ((CAXYDataset)plot.getDataset()).getMaxY(1);
-			if(tmpMaxY > maxY)	{
+		if (plot.getRenderer().isSeriesVisible(1)) {
+			double tmpMaxY = ((CAXYDataset) plot.getDataset()).getMaxY(1);
+			if (tmpMaxY > maxY) {
 				maxY = tmpMaxY;
 			}
 		}
-
+		
 		// Add some margins to the border
 		// FIXME : to compute according to the real series shape dimensions
 		// The code below doesn't work
-//		double shapeHalfWidth = chart.getXYPlot().getRenderer().getSeriesShape(0).getBounds2D().getWidth() / 2;
+		// double shapeHalfWidth = chart.getXYPlot().getRenderer().getSeriesShape(0).getBounds2D().getWidth() / 2;
 		double shapeHalfWidth = 0.02;
 		minX -= shapeHalfWidth;
 		maxX += shapeHalfWidth;
 		minY -= shapeHalfWidth;
 		maxY += shapeHalfWidth;
-
-
+		
+		
 		// Create the border
-		BasicStroke dashedStroke = new BasicStroke(0.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1f, new float[] {2f}, 0f);
+		BasicStroke dashedStroke = new BasicStroke(0.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1f, new float[] { 2f }, 0f);
 		XYLineAnnotation annotation;
 		Color borderColor = Color.GRAY;
-
+		
 		// Left border
 		annotation = new XYLineAnnotation(minX, minY, minX, maxY, dashedStroke, borderColor);
-        plot.addAnnotation(annotation);
-
-        // Right border
+		plot.addAnnotation(annotation);
+		
+		// Right border
 		annotation = new XYLineAnnotation(maxX, minY, maxX, maxY, dashedStroke, borderColor);
-        plot.addAnnotation(annotation);
-
+		plot.addAnnotation(annotation);
+		
 		// Bottom border
 		annotation = new XYLineAnnotation(minX, minY, maxX, minY, dashedStroke, borderColor);
-        plot.addAnnotation(annotation);
-
-        // Top border
+		plot.addAnnotation(annotation);
+		
+		// Top border
 		annotation = new XYLineAnnotation(minX, maxY, maxX, maxY, dashedStroke, borderColor);
-        plot.addAnnotation(annotation);
-
+		plot.addAnnotation(annotation);
+		
 	}
-
-
+	
+	
 	@Override
 	public void updateChartCAFactorialMapHighlightPoints(Object chart, boolean rows, String[] labels) {
-
-		MultipleItemsSelector selector = (MultipleItemsSelector) ((CAItemSelectionRenderer)((JFreeChart) chart).getXYPlot().getRenderer()).getItemsSelector();
-
+		
+		MultipleItemsSelector selector = (MultipleItemsSelector) ((CAItemSelectionRenderer) ((JFreeChart) chart).getXYPlot().getRenderer()).getItemsSelector();
+		
 		// Rows
 		int series = 0;
 		// Columns
-		if(!rows)	{
+		if (!rows) {
 			series = 1;
 		}
 		selector.removeAllSelectedItems(series);
-		int[] items = ((CAXYDataset)((JFreeChart) chart).getXYPlot().getDataset()).getLabelIndices(series, labels);
-
-		for(int i = 0; i < items.length; i++) {
+		int[] items = ((CAXYDataset) ((JFreeChart) chart).getXYPlot().getDataset()).getLabelIndices(series, labels);
+		
+		for (int i = 0; i < items.length; i++) {
 			selector.addSelectedItem(series, items[i]);
 		}
-
-		//((JFreeChart) chart).setNotify(true);
+		
+		// ((JFreeChart) chart).setNotify(true);
 	}
-
-
+	
+	
 	@Override
-	public void updateChartCAFactorialMapSetDimensions(CA ca)	{
-
-		int dimension1 = ca.getFirstDimension(); 
-		int dimension2 = ca.getSecondDimension(); 
+	public void updateChartCAFactorialMapSetDimensions(CA ca) {
 		
+		int dimension1 = ca.getFirstDimension();
+		int dimension2 = ca.getSecondDimension();
+		
 		JFreeChart chart = (JFreeChart) ca.getChart();
 		
-		 // Modify data set
-		 ((CAXYDataset) ((JFreeChart) chart).getXYPlot().getDataset()).setAxis1(dimension1);
-		 ((CAXYDataset) ((JFreeChart) chart).getXYPlot().getDataset()).setAxis2(dimension2);
-
-		 // Update axis labels
-		 // FIXME : create a method in CA to directly get a singular value as percent ?
-		 try {
-			 double sinuglarValuesSum = ca.getValeursPropresSum();
-			 DecimalFormat f = new DecimalFormat("###.00"); //$NON-NLS-1$
-			 ((JFreeChart) chart).getXYPlot().getDomainAxis().setLabel(NLS.bind(CACoreMessages.axisP0P1Percent, dimension1, f.format(100 * ca.getValeursPropres()[dimension1 - 1] / sinuglarValuesSum)));
-			 ((JFreeChart) chart).getXYPlot().getRangeAxis().setLabel(NLS.bind(CACoreMessages.axisP0P1Percent, dimension2, f.format(100 * ca.getValeursPropres()[dimension2 - 1] / sinuglarValuesSum)));
-
-			 // Refresh data set
-			 // FIXME : any way to fire a data set event rather than reassign the same data set?
-			 ((JFreeChart) chart).getXYPlot().setDataset(((JFreeChart) chart).getXYPlot().getDataset());
+		// Modify data set
+		((CAXYDataset) chart.getXYPlot().getDataset()).setAxis1(dimension1);
+		((CAXYDataset) chart.getXYPlot().getDataset()).setAxis2(dimension2);
+		
+		// Update axis labels
+		// FIXME : create a method in CA to directly get a singular value as percent ?
+		try {
+			double sinuglarValuesSum = ca.getValeursPropresSum();
+			DecimalFormat f = new DecimalFormat("###.00"); //$NON-NLS-1$
+			chart.getXYPlot().getDomainAxis().setLabel(NLS.bind(CACoreMessages.axisP0P1Percent, dimension1, f.format(100 * ca.getValeursPropres()[dimension1 - 1] / sinuglarValuesSum)));
+			chart.getXYPlot().getRangeAxis().setLabel(NLS.bind(CACoreMessages.axisP0P1Percent, dimension2, f.format(100 * ca.getValeursPropres()[dimension2 - 1] / sinuglarValuesSum)));
+			
+			// Refresh data set
+			// FIXME : any way to fire a data set event rather than reassign the same data set?
+			chart.getXYPlot().setDataset(chart.getXYPlot().getDataset());
 			// the code below doesn't neither center the view nor update the axes ticks of the new chart, continue tests
-			//((JFreeChart) chart).setNotify(true);
-
-
+			// ((JFreeChart) chart).setNotify(true);
+			
+			
 			// Update the limits border
-			this.createCAFactorialMapChartLimitsBorder((JFreeChart) chart);
-
+			this.createCAFactorialMapChartLimitsBorder(chart);
+			
 		}
-		catch(StatException e) {
+		catch (StatException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
-	 }
-
-
+		catch (REXPMismatchException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
 	
+	
+	
 	@Override
 	public ArrayList<String> getCAFactorialMapChartSelectedPoints(Object chart, int series) {
-
-		MultipleItemsSelector selector = (MultipleItemsSelector) ((CAItemSelectionRenderer)((JFreeChart) chart).getXYPlot().getRenderer()).getItemsSelector();
-		ArrayList<String> pointLabels = new ArrayList<String>(selector.getSelectedItemsCount(series));
-
-		if(selector.getSelectedItemsCount(series) > 0)	{
-
+		
+		MultipleItemsSelector selector = (MultipleItemsSelector) ((CAItemSelectionRenderer) ((JFreeChart) chart).getXYPlot().getRenderer()).getItemsSelector();
+		ArrayList<String> pointLabels = new ArrayList<>(selector.getSelectedItemsCount(series));
+		
+		if (selector.getSelectedItemsCount(series) > 0) {
+			
 			CAXYDataset dataset = (CAXYDataset) ((JFreeChart) chart).getXYPlot().getDataset();
 			int[] selectedItems = selector.getSelectedItems(series);
-
-			for(int i = 0; i < selectedItems.length; i++) {
+			
+			for (int i = 0; i < selectedItems.length; i++) {
 				pointLabels.add(dataset.getLabel(series, selectedItems[i]));
 			}
 		}
 		return pointLabels;
 	}
 	
-
-
-
+	
+	
+	
 	@Override
 	public void updateChartCAFactorialMapSetLabelItemsSelectionOrder(Object chart, String[] rowLabels, String[] colLabels) {
 		
-		MultipleItemsSelector selector = (MultipleItemsSelector) ((CAItemSelectionRenderer)((JFreeChart) chart).getXYPlot().getRenderer()).getItemsSelector();
-		selector.setCyclicItemsOrder(this.getItemsAndSeriesOrderedByLabels((CAXYDataset)((JFreeChart) chart).getXYPlot().getDataset(), rowLabels, colLabels)); 
+		MultipleItemsSelector selector = (MultipleItemsSelector) ((CAItemSelectionRenderer) ((JFreeChart) chart).getXYPlot().getRenderer()).getItemsSelector();
+		selector.setCyclicItemsOrder(this.getItemsAndSeriesOrderedByLabels((CAXYDataset) ((JFreeChart) chart).getXYPlot().getDataset(), rowLabels, colLabels));
 	}
-
 	
+	
 	/**
 	 * Gets a map where the values of the dataset are ordered according to the specified label arrays, keeping the order of these arrays and flatten but grouped by series.
+	 * 
 	 * @param dataset
 	 * @return
 	 */
-	public TreeMap<Object, ArrayList<Integer>> getItemsAndSeriesOrderedByLabels(CAXYDataset dataset, String[] rowLabels, String[] colLabels)	{
+	public TreeMap<Object, ArrayList<Integer>> getItemsAndSeriesOrderedByLabels(CAXYDataset dataset, String[] rowLabels, String[] colLabels) {
 		
-		TreeMap<Object, ArrayList<Integer>> orderedValues = new TreeMap<Object, ArrayList<Integer>>();
+		TreeMap<Object, ArrayList<Integer>> orderedValues = new TreeMap<>();
 		
 		int[] rowIndices = dataset.getOrderedLabelIndices(0, rowLabels);
 		int[] colIndices = dataset.getOrderedLabelIndices(1, colLabels);
 		
 		int i = 0;
-		for(; i < rowIndices.length; i++) {
-			ArrayList<Integer> itemData = new ArrayList<Integer>(2);
+		for (; i < rowIndices.length; i++) {
+			ArrayList<Integer> itemData = new ArrayList<>(2);
 			itemData.add(0); // series
 			itemData.add(rowIndices[i]); // item
 			orderedValues.put(i, itemData);
 		}
-		for(int j = 0; j < colIndices.length; j++) {
-			ArrayList<Integer> itemData = new ArrayList<Integer>(2);
+		for (int j = 0; j < colIndices.length; j++) {
+			ArrayList<Integer> itemData = new ArrayList<>(2);
 			itemData.add(1); // series
 			itemData.add(colIndices[j]); // item
 			orderedValues.put(j + i, itemData);
 		}
-	
+		
 		return orderedValues;
 	}
 	
@@ -369,8 +376,8 @@
 	public Class getResultDataClass() {
 		return CA.class;
 	}
-
-
 	
-
-}
\ No newline at end of file
+	
+	
+	
+}
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCEigenvaluesChartCreator.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCEigenvaluesChartCreator.java	(revision 2682)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCEigenvaluesChartCreator.java	(revision 2683)
@@ -5,6 +5,7 @@
 import org.jfree.chart.axis.NumberAxis;
 import org.jfree.data.category.DefaultCategoryDataset;
 import org.jfree.data.general.DatasetUtils;
+import org.rosuda.REngine.REXPMismatchException;
 import org.txm.ca.core.chartsengine.jfreechart.themes.highcharts.renderers.CAEigenvaluesItemSelectionRenderer;
 import org.txm.ca.core.functions.CA;
 import org.txm.ca.core.functions.Eigenvalues;
@@ -22,62 +23,67 @@
  *
  */
 public class JFCEigenvaluesChartCreator extends JFCChartCreator {
-
-
+	
+	
 	@Override
 	public Object createChart(ChartResult result) {
 		
-		CA ca = (CA) ((Eigenvalues) result).getCA();
+		CA ca = ((Eigenvalues) result).getCA();
 		JFreeChart chart = null;
-
+		
 		// Creates the empty dataset
 		DefaultCategoryDataset dataset = new DefaultCategoryDataset();
 		// Create the chart
 		chart = this.getChartsEngine().createCategoryBarChart(dataset, CACoreMessages.eigenvalues, CACoreMessages.axis, CACoreMessages.eigenvalue, false, false, false);
-
+		
 		// Custom renderer
 		chart.getCategoryPlot().setRenderer(new CAEigenvaluesItemSelectionRenderer(ca));
-
+		
 		return chart;
 	}
-
 	
+	
 	@Override
 	public void updateChart(ChartResult result) {
-
-		CA ca = (CA) ((Eigenvalues) result).getCA();
+		
+		CA ca = ((Eigenvalues) result).getCA();
 		JFreeChart chart = (JFreeChart) result.getChart();
 		
 		// freeze rendering while computing
 		chart.setNotify(false);
-
+		
 		// update the dataset
 		try {
-
+			
 			DefaultCategoryDataset dataset = (DefaultCategoryDataset) chart.getCategoryPlot().getDataset();
 			dataset.clear();
-
 			
+			
 			double[] singularValues = ca.getValeursPropres();
-	
-			for(int i = 0; i < singularValues.length; i++) {
+			
+			for (int i = 0; i < singularValues.length; i++) {
 				dataset.setValue(singularValues[i], CACoreMessages.eigenvalue, String.valueOf(i + 1));
 			}
-	
+			
 		}
-		catch(StatException e) {
+		catch (StatException e) {
 			Log.severe(NLS.bind(CACoreMessages.cantCreateBarChartOfTheCASingularValuesP0, e));
 			Log.printStackTrace(e);
 		}
-
-        // Custom range axis for ticks drawing options
-        chart.getCategoryPlot().setRangeAxis(new ExtendedNumberAxis((NumberAxis) chart.getCategoryPlot().getRangeAxis(), false, true, 0, DatasetUtils.findMaximumRangeValue(chart.getCategoryPlot().getDataset()).doubleValue()));
+		catch (REXPMismatchException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
 		
+		// Custom range axis for ticks drawing options
+		chart.getCategoryPlot().setRangeAxis(new ExtendedNumberAxis((NumberAxis) chart.getCategoryPlot().getRangeAxis(), false, true, 0, DatasetUtils.findMaximumRangeValue(chart.getCategoryPlot()
+				.getDataset()).doubleValue()));
+		
 		super.updateChart(result);
 		
-		// force the hide of the domain axis lines 
+		// force the hide of the domain axis lines
 		chart.getCategoryPlot().setDomainGridlinesVisible(false);
-
+		
 	}
 	
 	
@@ -85,8 +91,8 @@
 	public Class getResultDataClass() {
 		return Eigenvalues.class;
 	}
-
-
 	
-
-}
\ No newline at end of file
+	
+	
+	
+}
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/renderers/CAEigenvaluesItemSelectionRenderer.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/renderers/CAEigenvaluesItemSelectionRenderer.java	(revision 2682)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/renderers/CAEigenvaluesItemSelectionRenderer.java	(revision 2683)
@@ -7,6 +7,7 @@
 import org.jfree.chart.labels.CategoryToolTipGenerator;
 import org.jfree.data.category.CategoryDataset;
 import org.jfree.data.category.DefaultCategoryDataset;
+import org.rosuda.REngine.REXPMismatchException;
 import org.txm.ca.core.functions.CA;
 import org.txm.ca.core.messages.CACoreMessages;
 import org.txm.chartsengine.core.ChartsEngine;
@@ -18,18 +19,19 @@
 
 /**
  * Renderer providing item selection system and drawing features for selected item and custom rendering for CA eigenvalues bar charts.
+ * 
  * @author sjacquot
  *
  */
 public class CAEigenvaluesItemSelectionRenderer extends ItemSelectionCategoryBarRenderer {
-
-
+	
+	
 	/**
 	 * Percent values number format.
 	 */
 	protected DecimalFormat percentValuesNumberFormat;
-
-
+	
+	
 	/**
 	 * Creates a renderer dedicated to CA charts.
 	 */
@@ -38,40 +40,47 @@
 		this.mouseOverItemSelector.setResult(ca);
 		this.percentValuesNumberFormat = new DecimalFormat("#.00");
 	}
-
-
-
+	
+	
+	
 	@Override
-	public void initToolTipGenerator(final IRendererWithItemSelection renderer)	{
+	public void initToolTipGenerator(final IRendererWithItemSelection renderer) {
 		this.setDefaultToolTipGenerator(new CategoryToolTipGenerator() {
-
+			
 			@Override
 			public String generateToolTip(CategoryDataset dataset, int row, int column) {
-
+				
 				// Hexadecimal color
 				Color color = (Color) getSeriesPaint(row);
 				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
-
+				
 				DefaultCategoryDataset catDataset = (DefaultCategoryDataset) dataset;
 				Number value = catDataset.getValue(row, column);
-
-
+				
+				
 				CA ca = (CA) getItemsSelector().getResult();
-				List<List<Object>> singularValuesData = ca.getSingularValuesInfos();
-
+				List<List<Object>> singularValuesData;
+				try {
+					singularValuesData = ca.getSingularValuesInfos();
+				}
+				catch (REXPMismatchException e) {
+					e.printStackTrace();
+					return e.getMessage();
+				}
+				
 				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>#" + catDataset.getColumnKey(column) + "</p>"
 						+ "<p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) + ChartsEngineCoreMessages.EMPTY
-							+ " </span><b>" + valuesNumberFormat.format(value) + "</b></p>"
+						+ " </span><b>" + valuesNumberFormat.format(value) + "</b></p>"
 						+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.percent + ChartsEngineCoreMessages.EMPTY
-							+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(2)) + "</b></p>"
+						+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(2)) + "</b></p>"
 						+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.charts_singularValues_tooltipSum + CACoreMessages.percent
-							+ ChartsEngineCoreMessages.EMPTY
-							+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(3)) + "</b></p>"
+						+ ChartsEngineCoreMessages.EMPTY
+						+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(3)) + "</b></p>"
 						+ "</body><html>";
 			}
 		});
 	}
-
-
-
-}
\ No newline at end of file
+	
+	
+	
+}
