[R] print " character

Martin Maechler maechler at stat.math.ethz.ch
Tue Nov 20 17:48:46 CET 2007


>>>>> "LRC" == Luis Ridao Cruz <Luisr at frs.fo>
>>>>>     on Tue, 20 Nov 2007 15:57:07 +0000 writes:

    LRC> R-help,
    LRC> Sorry if this question has been discussed/posted before
    LRC> but I can't just find it myself.

    LRC> How can I print the comment character (") ?

Note that  ' " '  is *not* the comment character  (but '#' is)

What does 'print' mean ?  Maybe

 > cat('My name is "Luis", what\'s your name? \n')
 My name is "Luis", what's your name? 

or equivalently

 > cat("My name is \"Luis\", what's your name? \n")
 My name is "Luis", what's your name? 

Pay close attention to both single and double quotes
used above and to the use of '\' as "escape character".

Note that 'character' (a vector of "strings") is the basic type
R uses here.  Also see

 ?character
 ?Quotes

and the 'see also's inside them.

Martin Maechler, ETH Zurich



More information about the R-help mailing list