My data looks like this:
data <- read.table(header=T, text= \' PID Date Date.diff 1 2020-01-01 0 1 2020-01-02 1 1