Re: [R] How to print a variable with in double quotes

2009-09-04 Thread Duncan Murdoch
On 9/4/2009 12:18 PM, sailu Yellaboina wrote: I want to print a variable with in double quotes. For example x = 10 ; x ;#prints 10 "x" ; #prints x \"x\" ; # Error: unexpected input in "\" I want to the out put as'10' or "10" There are lots of ways to do that. The simplest is to c

Re: [R] How to print a variable with in double quotes

2009-09-04 Thread Dimitris Rizopoulos
do you mean something like this: x <- 10 as.character(x) I hope it helps. Best, Dimitris sailu Yellaboina wrote: I want to print a variable with in double quotes. For example x = 10 ; x ;#prints 10 "x" ; #prints x \"x\" ; # Error: unexpected input in "\" I want to the out put as

Re: [R] How to print a variable with in double quotes

2009-09-04 Thread baptiste auguie
Hi, Try this, x = 10 noquote(dQuote(x)) noquote(sQuote(x)) HTH, baptiste 2009/9/4 sailu Yellaboina > I want to print a variable with in double quotes. > For example > > x = 10 ; > x ;#prints 10 > "x" ; #prints x > \"x\" ; # Error: unexpected input in "\" > > I want to the out put