Changeset 336cc01 in tol
- Timestamp:
- Mar 20, 2009, 5:09:00 PM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 33f9c7a
- Parents:
- d9a156c
- File:
-
- 1 edited
-
tol/stdlib/math/R/Rapi.tol (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/R/Rapi.tol
rd9a156c r336cc01 25 25 Text _R.cmd = "R CMD BATCH --vanilla"; 26 26 Text _tmpdir = Replace(TmpDir, "\\", "/"); 27 Text _cwd = GetAbsolutePath(". ");28 Text _TOLutils.R = _cwd+ "/"+"TOLutils.R";29 Text _tmp.in.R = _tmpdir+" /"+"in%S.R";30 Text _tmp.R.out = _tmpdir+" /"+"Rout%S.log";31 Text _tmp.args.R = _tmpdir+" /"+"args%S.R";27 Text _cwd = GetAbsolutePath("./"); 28 Text _TOLutils.R = _cwd+ "TOLutils.R"; 29 Text _tmp.in.R = _tmpdir+"in%S.R"; 30 Text _tmp.R.out = _tmpdir+"Rout%S.log"; 31 Text _tmp.args.R = _tmpdir+"args%S.R"; 32 32 33 33 ////////////////////////////////////////////////////////////////////////////// … … 176 176 ////////////////////////////////////////////////////////////////////////////// 177 177 { 178 Text _MID = "[Rapi::RunRScript] "; 178 179 Text rndID = _randID(0); 179 180 … … 194 195 }); 195 196 196 Text _script = "source('"+_TOLutils.R+"'); "+197 Text _script = "source('"+_TOLutils.R+"'); "+ 197 198 ReplaceTable(script, [[ [["%S", rndID]], [["%A", args.R]] ]]); 198 199 … … 203 204 Text R.out = Replace(_tmp.R.out, "%S", rndID); 204 205 205 Text oscmd = _R.cmd+" "+in.R+" "+R.out;206 Text oscmd = _R.cmd+" \""+in.R+"\" \""+R.out+"\""; 206 207 If (verbose, 207 WriteLn( "[Rapi::RunRScript]Executing :\n<"+oscmd));208 WriteLn(_MID+"Executing :\n<"+oscmd)); 208 209 Real OSCmdWait(oscmd); 209 210 If (verbose, 210 WriteLn( "[Rapi:RunRScript]R output was :\n<"+ReadFile(R.out)));211 WriteLn(_MID+"R output was :\n<"+ReadFile(R.out))); 211 212 212 213 // Remove remporaly results
Note: See TracChangeset
for help on using the changeset viewer.
