Thanks to Henrik and David for responses. Both were right. A small edit
to my description of the problem (which has now been solved). I said
that the first version of system2 ( system2("sed -i s/oldword/newword/g
d:/junk/x/test.tex")) worked fine but in fact it was not working, it
just wasn't g
system2("sed", args=c("-i", "s/oldword\\s/newword/g", "d:/junk/x/test.tex"))
/Henrik
On Fri, Oct 11, 2013 at 8:58 AM, David Winsemius wrote:
>
> On Oct 10, 2013, at 8:16 AM, Zev Ross wrote:
>
>> Hi All,
>>
>> I'm trying to edit a file in place using system2 and sed from within R. I
>> can get m
On Oct 10, 2013, at 8:16 AM, Zev Ross wrote:
> Hi All,
>
> I'm trying to edit a file in place using system2 and sed from within R. I can
> get my command to work unless there is a backslash in the command in which
> case I'm warned about an "unrecognized escape". So, for example:
>
> system2(
Hi All,
I'm trying to edit a file in place using system2 and sed from within R.
I can get my command to work unless there is a backslash in the command
in which case I'm warned about an "unrecognized escape". So, for example:
system2("sed -i s/oldword/newword/g d:/junk/x/test.tex") # works fi
4 matches
Mail list logo