[Rd] Possibly broken system2 env-option
Hey all, what is wrong with this command: system2("echo", env = c(VAR = "Hello World"), args = c("$VAR")) I am a bit confused, as help("system2") writes about the env option: > character vector of name=value strings to set environment variables. Is this option buggy, or am I using it just wr
Re: [Rd] Possibly broken system2 env-option
nd line either: > > pd$ VAR="foo" echo $VAR > > pd$ > > Or even > > pd$ VAR="bar" > pd$ VAR="foo" echo $VAR > bar > > What you need is something like (NB: single quotes!) > > pd$ VAR="foo" sh -c 'echo $VAR'