[R] How to print a double quote

Ranjan Maitra maitra at iastate.edu
Thu Feb 22 20:23:49 CET 2007


try 

> cat("Open fnd \"test\"")

which is the same as for C.

HTH.

Ranjan

On Thu, 22 Feb 2007 14:09:26 -0500 "Bos, Roger" <roger.bos at us.rothschild.com> wrote:

> Can anyone tell me how to get R to include a double quote in the middle
> of a character string?  
> 
> For example, the following code is close:
> 
> > fnd<-"Open fnd 'test'"
> >            cat(fnd)
> Open fnd 'test'>            
> >
> 
> But instead of Open fnd 'test' I need: Open fnd "test".  Difference
> seems minor, but I am writing batch files for another program to read in
> and it has to have the double quotes to work.  
> 
> Thanks in advance for any help or ideas,
> 
> Roger
> 
> ********************************************************************** * 
> This message is for the named person's use only. It may 
> contain confidential, proprietary or legally privileged 
> information. No right to confidential or privileged treatment 
> of this message is waived or lost by any error in 
> transmission. If you have received this message in error, 
> please immediately notify the sender by e-mail, 
> delete the message and all copies from your system and destroy 
> any hard copies. You must not, directly or indirectly, use, 
> disclose, distribute, print or copy any part of this message 
> if you are not the intended recipient.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list