Re: R-beta: package ported from S to R

Albrecht Gebhardt (albrecht.gebhardt@uni-klu.ac.at)
Wed, 13 May 1998 18:10:24 +0200 (CEST)


Date: Wed, 13 May 1998 18:10:24 +0200 (CEST)
From: Albrecht Gebhardt <albrecht.gebhardt@uni-klu.ac.at>
To: r-help@stat.math.ethz.ch
Subject: Re: R-beta: package ported from S to R

On Wed, 13 May 1998, Hubert Palme wrote:

> 
> ... 
> it. There is an unknown function "unix". Is "system" the R
> replacement? If yes: There is no "input" parameter. How can I redirect
> input with "system"?

This function emulates unix() with system(): 

unix <- function (command, input, output.to.S = T) 
{
        if (!missing(input)) {
                file <- tempfile("unix")
                on.exit(unlink(file))
                cat(input, file = file, sep = "\n")
                command <- paste("<", file, command)
        }
        system(command, output.to.S)
}

Albrecht

------------------------------------------------------------------------------
Albrecht Gebhardt          email: albrecht.gebhardt@uni-klu.ac.at
Institut fuer Mathematik   Tel. : (++43 463) 2700/837
Universitaet Klagenfurt    Fax  : (++43 463) 2700/834
Villacher Str. 161         WWW  : http://www-stat.uni-klu.ac.at/~agebhard
A-9020 Klagenfurt, Austria
------------------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._