You can try noquote also:

noquote(paste('abc', '"xyz"', sep = ""))


On Wed, Jun 30, 2010 at 3:31 PM, Paul Evans <p.evan...@yahoo.com> wrote:

> Hi,
>
> How can I get double quotes embedded in the string?
>
> Example:
>
> --------------
> str1 <- '"xyz"'
>
> ## desired output
> # abc"xyz"
>
> qr2 <- paste('abc',str1,sep='')
> print(qr2)
>
> -----------------
>
> Actual output:
>
> > [1] "abc\"str\""
>
> I also tried putting an escape sequence before the quote, but couldn't get
> the
> string that I want.
>
>
> thanks,
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to