Quotes                 package:base                 R Documentation

_Q_u_o_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Descriptions of the various uses of quoting in R.

_D_e_t_a_i_l_s:

     Three types of quote are part of the syntax of R: single and
     double quotation marks and the backtick (or back quote, '`'). In
     addition, backslash is used for quoting the following character(s)
     inside character constants.

_C_h_a_r_a_c_t_e_r _c_o_n_s_t_a_n_t_s:

     Single and double quotes delimit character constants.  They can be
     used interchangeably but double quotes are preferred (and
     character constants are printed using double quotes), so single
     quotes are normally only used to delimit character constants
     containing double quotes.

     Backslash is used to start an escape sequence inside character
     constants. Unless specified in the following table, an escaped
     character is interpreted as the character itself. Single quotes
     need to be escaped by backslash in single-quoted strings, and
     double quotes in double-quoted strings.

       '\n'          newline
       '\r'          carriage return
       '\t'          tab
       '\b'          backspace
       '\a'          alert (bell)
       '\f'          form feed
       '\v'          vertical tab
       '\\'          backslash '\'
       '\nnn'        character with given octal code (1, 2 or 3 digits)
       '\xnn'        character with given hex code (1 or 2 hex digits)
       '\unnnn'      Unicode character with given hex code (1-4 hex digits)
       '\Unnnnnnnn'  Unicode character with given hex code (1-8 hex digits)

     The last two are only supported in Unicode and other multibyte
     locales, and the last is not supported on Windows.  All but the
     Unicode escape sequences are also supported when reading character
     strings from a connection by 'scan'.

_N_a_m_e_s _a_n_d _I_d_e_n_t_i_f_i_e_r_s:

     Identifiers consist of a sequence of letters, digits, the period
     ('.') and the underscore.  They must not start with a digit nor
     underscore, nor with a period followed by a digit.

     The definition of a _letter_ depends on the current locale, but
     only ASCII digits are considered to be digits.

     Such identifiers are also known as _syntactic names_ and may be
     used directly in R code.  Almost always, other names can be used
     provided they are quoted.  The preferred quote is the backtick
     ('`'), and 'deparse' will normally use it, but under many
     circumstances single or double quotes can be used (as a character
     constant will often be converted to a name).  One place where
     backticks may be essential is to delimit variable names in
     formulae: see 'formula'.

_S_e_e _A_l_s_o:

     'Syntax' for other aspects of the syntax.

     'sQuote' for quoting English text.

     'shQuote' for quoting OS commands.

     The _R Language Definition_ manual.

