diff options
author | TinWoodman92 <chrhodgden@gmail.com> | 2023-04-06 15:18:52 -0500 |
---|---|---|
committer | TinWoodman92 <chrhodgden@gmail.com> | 2023-04-06 15:18:52 -0500 |
commit | 1103dcfab38724e3fc29ec91f7ec06064b930bb4 (patch) | |
tree | 82f360f0b73065ca9b725e3a735c70c0897688d4 /launcher_R.py | |
parent | 3d709cfe3018872b2ff8328a316b613d12c225f6 (diff) |
renamed Python to R launcher
Diffstat (limited to 'launcher_R.py')
-rw-r--r-- | launcher_R.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/launcher_R.py b/launcher_R.py new file mode 100644 index 0000000..544dfc9 --- /dev/null +++ b/launcher_R.py @@ -0,0 +1,17 @@ +import os +from subprocess import * + +print(os.getcwd()) + +tar_fil = os.path.join(os.getcwd(),'source_file.r') +print(tar_fil) +if os.path.exists(tar_fil): + rscript_path = 'C:/Program Files/R/R-4.2.2/bin/Rscript.exe' + print(os.path.exists(rscript_path)) + rscript_cmd = 'Rscript' + run( + f'{rscript_cmd} "{tar_fil}"', + cwd = os.getcwd(), + start_new_session = True + ) + |