Révision 3255

tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java (revision 3255)
49 49
import org.txm.core.messages.TXMCoreMessages;
50 50
import org.txm.statsengine.core.StatException;
51 51
import org.txm.statsengine.core.data.QuantitativeDataStructure;
52
import org.txm.statsengine.core.messages.StatsEngineCoreMessages;
53 52
import org.txm.statsengine.core.utils.VectorizeArray;
54 53
import org.txm.statsengine.r.core.exceptions.RException;
55 54
import org.txm.statsengine.r.core.exceptions.RObjectAlreadyExist;
......
418 417
				return null;
419 418
			}
420 419
			
421
			String name;
420
			String path;
422 421
			if (OSDetector.isFamilyWindows()) {
423
				name = file.getCanonicalPath().replaceAll("/", "\\");
422
				path = file.getCanonicalPath().replaceAll("\\\\", "/");
424 423
			}
425 424
			else {
426
				name = file.getAbsolutePath();
425
				path = file.getAbsolutePath();
427 426
			}
428 427
			
429 428
			if (devicename.equals("devSVG")) safeEval("library(RSvgDevice);");
......
432 431
			// RChartsEngine will be able to dynamically compute the width from the number of bars in a barplot for example.
433 432
			// REXP xp = eval("try("+devicename+"(\"" + name + "\", width=20, height=10))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
434 433
			
435
			REXP xp = eval("try(" + devicename + "(\"" + name + "\"))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
434
			REXP xp = eval("try(" + devicename + "(\"" + path + "\"))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
436 435
			
437 436
			if (xp.isString() && xp.asString() != null) { // if there's a string
438 437
				// then we have a
......
1715 1714
	 * @throws StatException the stat exception
1716 1715
	 */
1717 1716
	public void toTxt(File file, String symbol) throws StatException {
1718
		eval("write.table(" + symbol + file.getAbsolutePath().replace("\\", "\\\\")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1717
		eval("write.table(" + symbol + file.getAbsolutePath().replace("\\\\", "/")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1719 1718
	}
1720 1719
	
1721 1720
	

Formats disponibles : Unified diff