SyntaxFix
Write A Post
Hire A Developer
Questions
You could find the difference between dates in columns in a data frame by using the function difftime as follows:
difftime
df$diff_in_days<- difftime(df$datevar1 ,df$datevar2 , units = c("days"))