R-alpha: Re: R-alpha system(.) -- use 'intern = TRUE'!

Martin Maechler (maechler@stat.math.ethz.ch)
Tue, 2 Apr 96 19:34:49 +0200


Date: Tue, 2 Apr 96 19:34:49 +0200
Message-Id: <9604021734.AA15339@>
From: Martin Maechler <maechler@stat.math.ethz.ch>
To: pgilbert@bank-banque-canada.ca
In-Reply-To: <96Apr2.114140est.29475@mailgate.bank-banque-canada.ca>
Subject: R-alpha: Re: R-alpha  system(.) -- use 'intern = TRUE'!

>>>>> "PaulG" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:

    ...
    PaulG> Assigning the value of system() still does not work:

    PaulG> > z <- system("pwd")
    PaulG> /dse.R2
    PaulG> > z
    PaulG> NULL

Yes, it does  WHEN you use  'intern = TRUE' :

>From help(system) :

>>      system            Invoke a System Command            system
>> 
>>           system(command, intern=false)
>> 
>>      ARGUMENTS
>> 
>>           command   the  system  command  to  be  invoked,  as  a
>>                     string.
>> 
>>           intern    a logical, indicates whether to make the out-
>>                     put of the command an R object.
>>    ......

> nchar(system("pwd",intern=T))
[1] 51
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-