[R] R script .bat file from Python

Miguel Manese jjonphl at gmail.com
Wed Feb 20 12:35:13 CET 2013


Hi Fabio,

I cannot reproduce it but this is probably some env var not set, or
some problem with the path to your R installation having whitespace in
it.

See ?.libPaths, if it is empty you might want to hard-code R_HOME somewhere.

Regards,

On Thu, Feb 14, 2013 at 10:58 PM, Fabio Veronesi <f.veronesi at gmail.com> wrote:
> Hello,
> I would like to start running a script from Python with the Rscript command.
> I tested several ways of invoking R from Python and I finally I succeeded.
>
> The problem is that the script starts but R does not recognize the
> installed packages.
> I tried simplifying the matter and I created a script.bat with the classic
> commands: Rscript c:\test.R
>
> If I run it by double clicking on it it works perfectly. However, if I try
> to run it from Python, with a command such as os.system("script.bat"), it
> says that it cannot recognize any of the packages that it needs to load.
>
> Has anyone had  a similar problem?
>
> Many thanks,
> Fabio
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list