I want to convert the column time to be in time decimal format and then find the time interval within each group of the user_id. I have tried the answer below, but I could not get it to work:
Days difference between two dates in same column in R
structure(list(question_id = c(5502L, 5502L, 5502L, 5502L, 5502L
), user_id = c(112197L, 112197L, 112197L, 114033L, 114033L), 
    time = structure(c(1603720173, 1603720388, 1603720702, 1603603115, 
    1603949442), class = c("POSIXct", "POSIXt"), tzone = ""), 
    prediction = c(0.9, 0.95, 0.9, 0.99, 0.94), log_score = c(0.84799690655495, 
    0.925999418556223, 0.84799690655495, 0.985500430304885, 0.910732661902913
    )), row.names = 156182:156186, class = "data.frame")