\HeaderA{localeconv}{Find Details of the Numerical and Monetary Representations
in the Current Locale}{localeconv}
\aliasA{Sys.localeconv}{localeconv}{Sys.localeconv}
\keyword{utilities}{localeconv}
\begin{Description}\relax
Get details of the numerical and monetary representations in the
current locale.
\end{Description}
\begin{Usage}
\begin{verbatim}
Sys.localeconv()
\end{verbatim}
\end{Usage}
\begin{Details}\relax
These settings are usually controlled by the environment variables
\env{LC\_NUMERIC} and \env{LC\_MONETARY} and if not set the values of
\env{LC\_ALL} or \env{LANG}.

Normally \R{} is run without looking at the value of \env{LC\_NUMERIC},
so the decimal point remains '\code{.}'.  So the first three of these
values will not be useful unless you have set \env{LC\_NUMERIC} in
the current \R{} session.
\end{Details}
\begin{Value}
A character vector with 18 named components.  See your ISO C
documentation for details of the meaning.

It is possible to compile \R{} without support for locales, in which
case the value will be \code{NULL}.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{Sys.setlocale}{Sys.setlocale}} for ways to set locales.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
Sys.localeconv()
## The results in the C locale are
##    decimal_point     thousands_sep          grouping   int_curr_symbol 
##              "."                ""                ""                "" 
##  currency_symbol mon_decimal_point mon_thousands_sep      mon_grouping 
##               ""                ""                ""                "" 
##    positive_sign     negative_sign   int_frac_digits       frac_digits 
##               ""                ""             "127"             "127" 
##    p_cs_precedes    p_sep_by_space     n_cs_precedes    n_sep_by_space 
##            "127"             "127"             "127"             "127" 
##      p_sign_posn       n_sign_posn 
##            "127"             "127"

## Now try your default locale (which might be "C").
## Not run: 
old <- Sys.getlocale()
Sys.setlocale(locale = "")
Sys.localeconv()
Sys.setlocale(locale = old)
## End(Not run)

## Not run: read.table("foo", dec=Sys.localeconv()["decimal_point"])
\end{ExampleCode}
\end{Examples}

