system() command in R
1
0
Entering edit mode
@rasanpreet-kaur-suri-4321
Last seen 9.7 years ago
Hi all, I have a local server insalled on my system and have to start that from within my R function. here is how I start it: cmd<-"sh start-server.sh" system(cmd, wait=FALSE) My function has to start the server and proceed with further steps. The server starts but the further steps of the program are not executed.The cursor keeps waiting after the server is started. i tried removing the wait=FALSE, but it still keeps waiting. I also tried putting the start-server in a separate function and my further script in a separate function and then run them together, but it still waits. The transition from the start of server to next step is not happening. Please help. I have been stuck on this for quite some time now. [[alternative HTML version deleted]]
• 761 views
ADD COMMENT
0
Entering edit mode
markus.boenn ▴ 50
@markusboenn-6784
Last seen 9.6 years ago
European Union
Hello, did you also try cmd<-"sh start-server.sh &" #<<<------ system(cmd, wait=FALSE) ?? Maybe this works. The "&" tells the process to run in the background. Markus rasanpreet kaur suri wrote: > Hi all, > I have a local server insalled on my system and have to start that from > within my R function. > > here is how I start it: > > cmd<-"sh start-server.sh" > system(cmd, wait=FALSE) > > My function has to start the server and proceed with further steps. The > server starts but the further steps of the program are not executed.The > cursor keeps waiting after the server is started. > > i tried removing the wait=FALSE, but it still keeps waiting. > > I also tried putting the start-server in a separate function and my further > script in a separate function and then run them together, but it still > waits. The transition from the start of server to next step is not > happening. > > Please help. I have been stuck on this for quite some time now. > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Markus B?nn Martin-Luther-Universit?t Halle-Wittenberg Naturwissenschaftliche Fakult?t III Institut f?r Informatik von-Seckendorff-Platz 1 06120 Halle (Saale)
ADD COMMENT
0
Entering edit mode
This question has nothing to do with Bioconductor and should be taken to R-help. If you read the source to system() you will see that wait=FALSE has the effect of appending ampersand to given cmd. On Mon, Apr 4, 2011 at 6:49 AM, Markus Boenn <boenn at="" informatik.uni-halle.de=""> wrote: > Hello, > > did you also try > > cmd<-"sh start-server.sh &" ? ?#<<<------ > system(cmd, wait=FALSE) > > > ?? > > Maybe this works. The "&" tells the process to run in the background. > > Markus > > rasanpreet kaur suri wrote: >> >> Hi all, >> I have a local server insalled on my system and have to start that from >> within my R function. >> >> here is how I start it: >> >> cmd<-"sh start-server.sh" >> system(cmd, wait=FALSE) >> >> My function has to start the server and proceed with further steps. The >> server starts but the further steps of the program are not executed.The >> cursor keeps waiting after the server is started. >> >> i tried removing the wait=FALSE, but it still keeps waiting. >> >> I also tried putting the start-server in a separate function and my >> further >> script in a separate function and then run them together, but it still >> waits. The transition from the start of server to next step is not >> happening. >> >> Please help. I have been stuck on this for quite some time now. >> >> ? ? ? ?[[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > > -- > Markus B?nn > Martin-Luther-Universit?t Halle-Wittenberg > Naturwissenschaftliche Fakult?t III > Institut f?r Informatik > von-Seckendorff-Platz 1 > 06120 Halle (Saale) > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY

Login before adding your answer.

Traffic: 680 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6