On 12 Aug 2003, Peter Dalgaard BSA wrote:
> "Simon Fear" <[EMAIL PROTECTED]> writes:
>
> > > system("COMMAND.COM /c dir /b", intern=T, show.output.on.console=T)
> > character(0)
> > > print(system("COMMAND.COM /c dir /b", intern=F,
> > show.output.on.console=T))
> > [1] 0
> >
> > In both cases here a DOS window opens and lists a couple of hundred
> > files,
> > before giving the above output.
>
> Does it help if you drop the "COMMAND.COM /c" bit??
No, but as `dir' is an internal command, it does help to use shell() and
not system(). It is shell() that is the equivalent of S-PLUS's dos()
command.
Not that R has dir() and list.files(), though.
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help