[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    Re: [R] Error when calling R from Python
From:       Martin Maechler <maechler () stat ! math ! ethz ! ch>
Date:       2021-01-26 11:37:58
Message-ID: 24591.65302.527022.733577 () stat ! math ! ethz ! ch
[Download RAW message or body]

> > > > > Marcel Baumgartner 
> > > > > on Tue, 26 Jan 2021 08:55:48 +0100 writes:

    > Dear all, my colleague posted our issue on stackoverflow:

    > Calling R script from Python does not save log file in
    > version 4 - Stack Overflow
    > [https://stackoverflow.com/questions/65887485/calling-r-script-from-python-does-not-save-log-file-in-version-4]


    > It is about this kind of call to R:

    > R.exe -f code.R --args "~/file.txt" 1> "~/log.txt" 2>&1".

    > The issue is that the log.txt file is not created when
    > running R 4.x.x. The same code works perfectly fine with R
    > 3.6.x.

    > Any idea what's going wrong as of version 4? Regards
    > Marcel 

Dear Marcel,
I think the solution is embarrassingly simple:

From the SO post, where she showed a bit more detail than you
show here, it's clear  you have confused
'R.exe' and 'Rscript.exe' and what you say above is not true:

'R.exe' was used for R 3.6.0  but for R 4.0.3, you/she used
'Rscript.exe' instead.

... as you've noticed now, they do behave differently, indeed!

Avec meilleures salutations,
Martin

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic