Quantcast

call to system returns warning : status 2 (Ubuntu)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

call to system returns warning : status 2 (Ubuntu)

Eric Elguero-2
Hi everybody,

I have to run under Ubuntu a programs repeatedly
with different arguments and I am using R just to
generate the data files and call the external program.

basically, in my script I have inside a loop these two lines:

command <- paste(<some constant or variable strings>,sep="")
system(command,intern=T,wait=T)

when I run this script, I get a number of warnings,
like this one:

16: running command '~/LDhat22/ldconvert -seq ld/serca/serca-Trs.fas
-freqcut 0.0 -missfreqcut 100.0 -sites 1 3687 -nous 6 >
ld/serca/serca-Trs.out' had status 2


however, when I run the very same command at the bash prompt,
everything seems fine (no complaint).

in either cases, the output is the same and looks correct.

So, may I just ignore these warnings or is there something
I should fix?

thank you in advance,

Eric Elguero
MIVEGEC
IRD -CNRS - UM1
Montpellier - France

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: call to system returns warning : status 2 (Ubuntu)

Uwe Ligges-3


On 18.03.2012 15:39, Eric Elguero wrote:

> Hi everybody,
>
> I have to run under Ubuntu a programs repeatedly
> with different arguments and I am using R just to
> generate the data files and call the external program.
>
> basically, in my script I have inside a loop these two lines:
>
> command<- paste(<some constant or variable strings>,sep="")
> system(command,intern=T,wait=T)
>
> when I run this script, I get a number of warnings,
> like this one:
>
> 16: running command '~/LDhat22/ldconvert -seq ld/serca/serca-Trs.fas
> -freqcut 0.0 -missfreqcut 100.0 -sites 1 3687 -nous 6>
> ld/serca/serca-Trs.out' had status 2

Not sure what status 2 is in ldconvert. Are you sure you get 0 when you
call it directly? Anyway, the issue may well come from using different
shells (directly and via the system call).

Uwe Ligges




>
>
> however, when I run the very same command at the bash prompt,
> everything seems fine (no complaint).
>
> in either cases, the output is the same and looks correct.
>
> So, may I just ignore these warnings or is there something
> I should fix?
>
> thank you in advance,
>
> Eric Elguero
> MIVEGEC
> IRD -CNRS - UM1
> Montpellier - France
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Loading...