I have the below line of code in my R script which is working when I invoke R from command line in Linux environment,
system('spectre run.scs -f psfascii +l mylog.txt >> /dev/null')
But the same line is not working when I run this script by launching RStudio from the command line,
> system('spectre run.scs -f psfascii +l mylog.txt >> /dev/null') sh: spectre: command not found
spectre is a valid command which works when R is invoked, but when rstudio the command is not getting recognized.
Point to Note: The spectre command is from an external module apart from R, which I have loaded in the linux terminal like below before calling R and rstudio.
sgpengrl006:sviswan1:107 > module load cadenceMMSIM/13.11.292 sgpengrl006:sviswan1:108 > rstudio
I assume it might be a $PATH error, so I tried to check the command spectre path,
sgpengrl006:sviswan1:80 > which spectre /tool/eda/apps/cadenceMMSIM/13.11.292/tools/bin/spectre
And which $PATH shows the below path,
sgpengrl006:sviswan1:84 > which $PATH /tool/eda/apps/synopsysHspice/2013.03-SP2/hspice/bin:/tool/eda/apps/synopsysHspice/2013.03-SP2/hspice/arch:/tool/eda/apps/mentorCalibre/2014.2_33.25/aoi_cal_2014.2_33.25/bin:/tool/eda/apps/cadenceMMSIM/13.11.292/tools/bin:/tool/eda/apps/cadenceMMSIM/13.11.292/bin:/tool/eda/apps/cadenceICOA/220.127.116.110.11/share/oa/bin:/tool/eda/apps/cadenceICOA/18.104.22.1680.11/tools/dfII/bin:/tool/eda/apps/cadenceICOA/22.214.171.1240.11/tools/bin:/tool/pandora64/bin:/tool/pandora64/sbin:/tool/pandora/bin:/tool/pandora/sbin:/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/opt/puppetlabs/bin: Command not found.
I'm not able to identify if this is a $PATH error.