Guess the type of a vector
Guess the type of a vector
guess_type( x, na = c("", "NA"), locale = default_locale(), guess_integer = FALSE )
x |
Character vector of values to parse. |
na |
Character vector of strings to interpret as missing values. Set this
option to |
locale |
The locale controls defaults that vary from place to place.
The default locale is US-centric (like R), but you can use
|
guess_integer |
If |
# Logical vectors guess_type(c("FALSE", "TRUE", "F", "T")) # Integers and doubles guess_type(c("1","2","3")) guess_type(c("1.6","2.6","3.4")) # Numbers containing grouping mark guess_type("1,234,566") # ISO 8601 date times guess_type(c("2010-10-10")) guess_type(c("2010-10-10 01:02:03")) guess_type(c("01:02:03 AM"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.