[R] how to stop interpretation in system()

Sarah Goslee sarah.goslee at gmail.com
Thu Jul 21 22:07:19 CEST 2016


You could escape the backslash.

system("cmd 'a\\tb'")


On Thu, Jul 21, 2016 at 4:00 PM, Michael Peng
<michael.gang.peng at gmail.com> wrote:
> Hi,
>
> I am trying to use system() to run some command in OS. such as
>
> system("cmd 'a\tb')
>
> however,  it alway runs
> cmd 'a    b'
> instead of
> cmd 'a\tb'
>
> How can I prevent system to interpret 'a\tb' to 'a    b'?
>
>
> Thanks

-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list