Re: [R] shQuote and cat

2008-07-23 Thread Duncan Murdoch
On 7/23/2008 12:20 PM, Vadim Organovich wrote: Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? No, cat(a.string) should print the original a.string. shQuote(a.string) adds quotes so that a.string can be used in the shell.

[R] shQuote and cat

2008-07-23 Thread Vadim Organovich
Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? I am not sure cat() correctly prints strings which are generated by triple-shQuote(): > shQuote(shQuote("a")) [1] "\"\\\"a\\\"\"" > cat(shQuote(shQuote(shQuote("a"))), '\n') "\"\