Re: [R] shell scripts in R

From: Marc Schwartz (via MN) <mschwartz_at_mn.rr.com>
Date: Fri 14 Oct 2005 - 08:14:03 EST

On Fri, 2005-10-14 at 00:04 +0200, Benedykt P. Barszcz wrote:
> Dnia czwartek, 13 października 2005 23:25, Andrew Robinson napisał:
> > Marco,
> >
> > use the system command.
> >
> > ?system
> >
> > I hope that this helps,
>
> system(ls, intern = FALSE, ignore.stderr = TRUE)
> Error in as.character(args[[i]]) : cannot coerce to vector
>
> In fact it ignores the stderr !

As per ?system:

command the system command to be invoked, as a string.

Thus,

 system("ls", intern = FALSE, ignore.stderr = TRUE)

HTH, Marc Schwartz



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Oct 14 08:29:29 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:51:24 EST