@Dan-8327 Apologies for the delay in response and all the inconvenience caused because of this issue.
stdout and stderr files are present in the temporary drive as mentioned in the documentation.
Since you are not able to locate the logs of rscript command in stdout comand, I am suspecting this is not able to capture command line outputs. One of the way which I can think of to get the logs is to use redirection operator in the command itself so that output is logged into files directly.
You can read about redirection of cmd output and error to file from here.
By using above approach, your command could transform into
cmd /c RScript.exe -e "install.packages('rpart', repos='https://cran.rstudio.com/';)"; >> routput.log 2>> rerror.log
(Make sure to use >> operator instead of > operator which would override the file in next cmd command)
After this, you will be able to see routput.log and rerror.log in the temporary storage and identify the cause of the actual problem.
Hope this helps.
Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics