# logical
numericise(TRUE)
numericise(matrix(c(TRUE, FALSE), nrow = 2))
# integer
numericise(2L)
# double
numericise(c(1, 3))
# factor
numericise(factor(c("c", "a")))
# Date
numericise(as.Date("1972-01-01"))
# POSIXct
numericise(as.POSIXct("1972-01-01", tz = "UTC"))
# hms
numericise(hms::as_hms("00:01:03"))
# matrix
numericise(matrix(TRUE))
# array
numericise(array(TRUE))
# data.frame
numericise(data.frame(
logical = c(TRUE, FALSE, NA),
integer = 1:3,
numeric = c(4, 10, NA),
factor = as.factor(c("c", "A", "green"))
))
Run the code above in your browser using DataLab