I am trying to use as_tbl_time
but I am receiving the error in the title.
library(tidyverse)
library(lubridate)
dates <- c("01/01/18 1:01:10 PM" ,"01/01/18 1:10:10 PM")
vals <- c(100, 200)
df <- data.frame(dates, vals)
df$dates <- dmy_hms(df$dates)
df <- as_tbl_time(df, index = df$dates)