From |ukemo|@on @end|ng |rom gm@||@com  Wed Mar 20 01:00:21 2019
From: |ukemo|@on @end|ng |rom gm@||@com (l o)
Date: Tue, 19 Mar 2019 20:00:21 -0400
Subject: [Rd] Possibly broken system2 env-option
Message-ID: <CANprkZ_37Uu3CNr=M_sYemLWDsskcsU2gX7O7d51VyyvqO14GA@mail.gmail.com>

Studying Professor Dalgaard's code a bit, here is a little hack that
returns the desired result on Unix-alikes:

From

>* system2("echo", env = c("VAR='Hello World'"), args = c("$VAR"))*

to

>* system2("echo", env = c("VAR='Hello World';"), args = c("$VAR"))*
Hello World

That is, adding the semi-colon effectively transforms

pd$ VAR="foo" echo $VAR

to

pd$ VAR="foo"; echo $VAR


Maybe this doesn't apply to more complicated situations,though.

luke

	[[alternative HTML version deleted]]



[Rd] Possibly broken system2 env-option
l o