mtex[3]<-"I need\'s a \"double quote\" with no backslash" mtex[3] [1] "I need's a \"double quote\" with no backslash" so how is it done? Thanks in advance, graham lawrence _________________________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"graham lawrence" <forporphyry at hotmail.com> writes:> mtex[3]<-"I need\'s a \"double quote\" with no backslash" > mtex[3] > [1] "I need's a \"double quote\" with no backslash" > > so how is it done? Thanks in advance,You's got two of them in there already! Try cat(mtex[3], "\n") Printing character strings will always escape double quotes, backaslashes and various control characters. No way around that except by using cat(). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 16 Apr 2002, graham lawrence wrote:> mtex[3]<-"I need\'s a \"double quote\" with no backslash" > mtex[3] > [1] "I need's a \"double quote\" with no backslash" > > so how is it done? Thanks in advance,Do you want to construct a string that contains a double quote and no backslash or to print a double quote on the screen without printing a backslash? You've done the first, as this shows> a<-"\"" > a[1] "\""> nchar(a)[1] 1 so a contains a single character, the double quote. To display on the screen without a backslash use> print(a,quote=F)[1] " or> cat(a)"> -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._