I'm trying to label a data.frame with one of the columns of the format 'hms', as follows:
library(Hmisc)
data <- data.frame(time = c(hms::hms(20, 20, 20), hms::hms(30, 20, 10)),
date = c(as.Date("2001/01/01"), as.Date("2001/01/01")))
label(data) <- list(time = "Time", date = "Date")
However, I get the following error when trying to view the data.frame in RStudio
Error in `as.character()`:
! Can't convert `x` <labelled> to <character>.
Run `rlang::last_trace()` to see where the error occurred.
The issue is with the time variable
Try: