[R] system()

Rui Barradas ruipbarradas at sapo.pt
Mon Apr 14 21:08:50 CEST 2014


Hello,

Try instead

command <- paste(aa, fnm)
system(command)

And read the help page for ?paste

Hope this helps,

Rui Barradas


Em 14-04-2014 20:02, Doran, Harold escreveu:
> I need to send a system command to another program from within R but have a small hangup
>
> I'm trying to do something like this
>
> system("notepad myfile.txt")
>
> But, more generally this is happening to multiple files, so I loop over thousands of files. For purposes of an example, my code is something like this, which does not work
>
> aa <- 'notepad.exe'
> fnm <- 'myfile.txt'
> system("aa fnm")
>
> Any suggestions?
> Harold
>
> 	[[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