Last chance! 50% off unlimited learning
Sale ends in
Support functions for the convert
function. These functions coerces vectors to a new data type, e.g. as.numeric
except that it converts factors to character first.
See convert
for more information.
as_reliable_num(.x, ...)as_reliable_int(.x, ...)
as_reliable_lgl(.x, ...)
as_reliable_dte(.x, origin = "1970-01-01", ...)
as_reliable_dtm(.x, origin = "1970-01-01", tz = "UTC", ...)
as_reliable_int(.x, ...)
as_reliable_lgl(.x, ...)
as_reliable_dte(.x, origin = "1970-01-01", ...)
as_reliable_dtm(.x, origin = "1970-01-01", tz = "UTC", ...)
vector
vector
additional arguments
argument to set origin for date/date time.
argument to set time zone for date/date time. Default is UTC.
vignette("convert")
, vignette("hablar")
x <- as.factor(c("1", "3.5"))
as_reliable_num(x)
x <- as.factor(c("9", "7"))
as_reliable_int(x)
x <- as.factor(c("1", "0"))
as_reliable_lgl(x)
Run the code above in your browser using DataLab