Author: jcouteau Date: 2010-01-12 09:57:00 +0100 (Tue, 12 Jan 2010) New Revision: 178 Modified: trunk/src/main/java/org/nuiton/j2r/types/RDataFrame.java trunk/src/main/resources/log4j.properties Log: Fix DataFrame getData bug Modified: trunk/src/main/java/org/nuiton/j2r/types/RDataFrame.java =================================================================== --- trunk/src/main/java/org/nuiton/j2r/types/RDataFrame.java 2010-01-10 23:37:57 UTC (rev 177) +++ trunk/src/main/java/org/nuiton/j2r/types/RDataFrame.java 2010-01-12 08:57:00 UTC (rev 178) @@ -42,12 +42,11 @@ public class RDataFrame extends REXPAbstract implements REXP { private Log log = LogFactory.getLog(RDataFrame.class); - - //TODO implement the logger use ! + //Vector containing the names of the rows of the data.frame vectors private List<String> rowNames; //Vector containing the vectors of the data.frame - private List<List<? extends Object>> data; + private List<List<?>> data; /** * Constructor @@ -58,7 +57,7 @@ super(); this.names = new ArrayList<String>(); this.rowNames = new ArrayList<String>(); - this.data = new ArrayList<List<? extends Object>>(); + this.data = new ArrayList<List<?>>(); this.variable = ""; this.engine = engine; this.attributes = new HashMap<String, Object>(); @@ -116,7 +115,7 @@ * initialize */ public RDataFrame(REngine engine, List<String> names, - List<String> rowNames, List<List<? extends Object>> data, + List<String> rowNames, List<List<?>> data, String variable) throws RException { super(); this.names = names; @@ -456,7 +455,7 @@ public Object get(int x, int y) throws RException { checkX(x); checkY(y); - if (engine.isAutoCommit()) { + if ((engine.isAutoCommit())&&(this.variable!=null)&&(!this.variable.isEmpty())) { Object returnObject = engine.eval(String.format( RInstructions.GET_DATAFRAME_ITEM, this.variable, y + 1, x + 1)); Modified: trunk/src/main/resources/log4j.properties =================================================================== --- trunk/src/main/resources/log4j.properties 2010-01-10 23:37:57 UTC (rev 177) +++ trunk/src/main/resources/log4j.properties 2010-01-12 08:57:00 UTC (rev 178) @@ -5,4 +5,4 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n # package level -log4j.logger.org.codelutin.j2r=INFO +log4j.logger.org.nuiton.j2r=INFO