EVOLUTION-MANAGER
Edit File: Sys.localeconv.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Find Details of the Numerical and Monetary Representations in...</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for Sys.localeconv {base}"><tr><td>Sys.localeconv {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Find Details of the Numerical and Monetary Representations in the Current Locale</h2> <h3>Description</h3> <p>Get details of the numerical and monetary representations in the current locale. </p> <h3>Usage</h3> <pre> Sys.localeconv() </pre> <h3>Details</h3> <p>Normally <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is run without looking at the value of <span class="env">LC_NUMERIC</span>, so the decimal point remains '<code>.</code>'. So the first three of these components will only be useful if you have set the locale category <code>LC_NUMERIC</code> using <code>Sys.setlocale</code> in the current <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session (when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> may not work correctly). </p> <p>The monetary components will only be set to non-default values (see the ‘Examples’ section) if the <code>LC_MONETARY</code> category is set. It often is not set: set the examples for how to trigger setting it. </p> <h3>Value</h3> <p>A character vector with 18 named components. See your ISO C documentation for details of the meaning. </p> <p>It is possible to compile <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> without support for locales, in which case the value will be <code>NULL</code>. </p> <h3>See Also</h3> <p><code><a href="locales.html">Sys.setlocale</a></code> for ways to set locales. </p> <h3>Examples</h3> <pre> 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"). old <- Sys.getlocale() ## The category may not be set: ## the following may do so, but it might not be supported. Sys.setlocale("LC_MONETARY", locale = "") Sys.localeconv() ## or set an appropriate value yourself, e.g. Sys.setlocale("LC_MONETARY", "de_AT") Sys.localeconv() Sys.setlocale(locale = old) ## Not run: read.table("foo", dec=Sys.localeconv()["decimal_point"]) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>