Re: [R] sprintf doesn't care of escape characters

2012-07-30 Thread Edwin Helbert Aponte Angarita
ll show the escape > characters, but if you use "cat", or output to a file, you will see > that the result is correct: > > > > cat( sprintf("a\nb")) > a > b> > > cat(sprintf("a\"bc\"d")) > a"bc"d> > > >

[R] sprintf doesn't care of escape characters

2012-07-30 Thread Edwin Helbert Aponte Angarita
Hi. I am having trouble with something that should be simple. I am unable to get sprintf using escape sequences: > sprintf("a\nb") [1] "a\nb" > sprintf("a\"bc\"d") [1] "a\"bc\"d" But it seems to need them any way: > sprintf("a\"bc"d") Error: unexpected symbol in "sprintf("a\"bc"d" Any suggest