hsChrToNum | R Documentation |
Conversion of text representing a number to a valid number
hsChrToNum(x, country, stopOnError = TRUE)
x |
(vector of) text value(s) to be converted to numeric |
country |
"en" if value(s) in x is (are) given in English format (decimal point ".", thousands separator ",") or "de" if value is given in German format (decimal point ",", thousands separator "."). |
stopOnError |
if TRUE (default) the program stops if any of the given values could not be converted. |
vector of numeric(s). In case of conversion the function stops (if
stopOnError = TRUE
) or returns NA
for those indices for which
the conversion failed. In the latter case an attribute "errorIndices"
containing the corresponding indices is assigned to the result vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.