NumericConstants            package:base            R Documentation

_N_u_m_e_r_i_c _C_o_n_s_t_a_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     How R parses numeric constants.

_D_e_t_a_i_l_s:

     R parses numeric constants in its input in a very similar way to C
     floating-point constants.

     'Inf' and 'NaN' are numeric constants.  All other numeric
     constants start with a digit or period.

     Hexadecimal constants start with '0x' or '0X' followed by a
     non-empty sequence from '0-9 a-f A-F' which is interpreted as a
     hexadecimal number.

     Decimal constants consists of a nonempty sequence of digits
     possibly containing a period (the decimal point), optionally
     followed by a decimal exponent.  A decimal exponent consists of an
     'E' or 'e' followed by an optional plus or minus sign followed by
     a non-empty sequence of digits, and indicates multiplication by a
     power of ten.

     A numeric constant immediately followed by 'i' is regarded as an
     imaginary complex number.

     Only the ASCII digits 0-9 are recognized as digits, even in
     languages which have other representations of digits. The 'decimal
     separator' is always a period and never a comma.

     Note that a leading plus or minus is not part of numeric constant
     but a unary operator applied to the constant.

_S_e_e _A_l_s_o:

     'Syntax'.

     'Quotes' for the parsing of character constants,

