View source: R/util_conversion_stable.R
util_conversion_stable | R Documentation |
DATA_TYPE
the function also checks, if the conversion is perfect, or if something
is lost (e.g., decimal places), or something is strange (like arbitrary
suffixes in a date, just note, that
as.POSIXct("2020-01-01 12:00:00 CET asdf")
does not fail in R
), but
util_conversion_stable("2020-01-01 12:00:00 CET asdf", DATA_TYPES$DATETIME)
will.
util_conversion_stable(vector, data_type, return_percentages = FALSE)
vector |
vector input vector, |
data_type |
enum The type, to what the conversion should be tried. |
return_percentages |
logical return the percentage of stable conversions or matches. |
HINT:
util_conversion_stable(.Machine$integer.max + 1, DATA_TYPES$INTEGER)
seems
to work correctly, although is.integer(.Machine$integer.max + 1)
returns FALSE
.
numeric ratio of convertible entries in vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.