Changeset 336cc01 in tol


Ignore:
Timestamp:
Mar 20, 2009, 5:09:00 PM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
33f9c7a
Parents:
d9a156c
Message:

Avoiding duplicate / in paths

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@795 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/math/R/Rapi.tol

    rd9a156c r336cc01  
    2525  Text _R.cmd = "R CMD BATCH --vanilla";
    2626  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";
    3232
    3333  //////////////////////////////////////////////////////////////////////////////
    … …  
    176176  //////////////////////////////////////////////////////////////////////////////
    177177  {
     178    Text _MID = "[Rapi::RunRScript] ";
    178179    Text rndID = _randID(0);
    179180   
    … …  
    194195      });
    195196     
    196    Text _script  = "source('"+_TOLutils.R+"'); "+
     197    Text _script  = "source('"+_TOLutils.R+"'); "+
    197198     ReplaceTable(script,  [[ [["%S", rndID]], [["%A", args.R]] ]]);
    198199
    … …  
    203204    Text R.out = Replace(_tmp.R.out, "%S", rndID);
    204205
    205     Text oscmd = _R.cmd+" "+in.R+" "+R.out;
     206    Text oscmd = _R.cmd+" \""+in.R+"\" \""+R.out+"\"";
    206207    If (verbose,
    207         WriteLn("[Rapi::RunRScript] Executing :\n<"+oscmd));
     208        WriteLn(_MID+"Executing :\n<"+oscmd));
    208209    Real OSCmdWait(oscmd);
    209210    If (verbose,
    210         WriteLn("[Rapi:RunRScript] R output was :\n<"+ReadFile(R.out)));
     211        WriteLn(_MID+"R output was :\n<"+ReadFile(R.out)));
    211212
    212213    // Remove remporaly results
Note: See TracChangeset for help on using the changeset viewer.