For example, from within an R script I would like to be able to launch NotePad.exe. Is there an R call for launching Notepad.exe from within R? I've tried the following, but they don't seem to work:> system(paste('"C:/WINDOWS/NOTEPAD.exe"'), wait = FALSE) > system("C:/WINDOWS/NOTEPAD.exe", wait = FALSE) > system("NOTEPAD", wait = FALSE)That is, these do not bring up the Notepad GUI. Thanks for any insights.
Jorge Ivan Velez
2009-Mar-24 20:20 UTC
[R] Executing an external executable from within R?
Dear Jason, Try this: shell.exec('C:/WINDOWS/NotePad.exe') HTH, Jorge On Tue, Mar 24, 2009 at 4:14 PM, Jason Rupert <jasonkrupert@yahoo.com>wrote:> > For example, from within an R script I would like to be able to launch > NotePad.exe. > > Is there an R call for launching Notepad.exe from within R? > > I've tried the following, but they don't seem to work: > > system(paste('"C:/WINDOWS/NOTEPAD.exe"'), wait = FALSE) > > system("C:/WINDOWS/NOTEPAD.exe", wait = FALSE) > > system("NOTEPAD", wait = FALSE) > > That is, these do not bring up the Notepad GUI. > > Thanks for any insights. > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
Gabor Grothendieck
2009-Mar-24 20:44 UTC
[R] Executing an external executable from within R?
shell("notepad") works for me. I am using Windows Vista. On Tue, Mar 24, 2009 at 4:14 PM, Jason Rupert <jasonkrupert at yahoo.com> wrote:> > For example, from within an R script I would like to be able to launch NotePad.exe. > > Is there an R call for launching Notepad.exe from within R? > > I've tried the following, but they don't seem to work: >> system(paste('"C:/WINDOWS/NOTEPAD.exe"'), wait = FALSE) >> system("C:/WINDOWS/NOTEPAD.exe", wait = FALSE) >> system("NOTEPAD", wait = FALSE) > > That is, these do not bring up the Notepad GUI. > > Thanks for any insights. > > ______________________________________________ > 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. >