diff --git a/r4knime/src/de/mpicbg/tds/knime/scripting/r/OpenInRNodeModel.java b/r4knime/src/de/mpicbg/tds/knime/scripting/r/OpenInRNodeModel.java index 84407f6e..9c569958 100755 --- a/r4knime/src/de/mpicbg/tds/knime/scripting/r/OpenInRNodeModel.java +++ b/r4knime/src/de/mpicbg/tds/knime/scripting/r/OpenInRNodeModel.java @@ -70,7 +70,7 @@ protected BufferedDataTable[] execute(final BufferedDataTable[] inData, workspaceFile = File.createTempFile("rplugin", ".RData"); workspaceFile.deleteOnExit(); - REXP xp = connection.parseAndEval("r=readBin(tmpwfile,'raw'," + estimateNumValues(inData) + "); unlink(tmpwfile); r"); + REXP xp = connection.parseAndEval("r=readBin(tmpwfile,'raw',file.info(tmpwfile)$size); unlink(tmpwfile); r"); FileOutputStream oo = new FileOutputStream(workspaceFile); oo.write(xp.asBytes()); oo.close(); @@ -119,8 +119,9 @@ public static void openWSFileInR(File workspaceFile, String script) throws IOExc /** * Attempts to find an upper bound of the number of values of node input. + * USAGE IN 'execute' method HAS BEEN REPLACED BY AN R-COMMAND - CAN BE DELETED AT SOME POINT */ - private int estimateNumValues(BufferedDataTable[] pushTable) { + /* private int estimateNumValues(BufferedDataTable[] pushTable) { int inputSize = 0; @@ -133,10 +134,10 @@ private int estimateNumValues(BufferedDataTable[] pushTable) { return (int) (10.1 * inputSize); // add some size for meta data like table headers - } + } */ - private int calcTableSize(BufferedDataTable bufferedDataTable) { + /* private int calcTableSize(BufferedDataTable bufferedDataTable) { return bufferedDataTable.getDataTableSpec().getNumColumns() * bufferedDataTable.getRowCount(); - } + } */ } \ No newline at end of file