I have two coloumns START and DATE, I need to calculate the difference between the dates (in year, month and days) and then calculate average of the differences mean (START-END). Thanks for the help. This question is not the same to other questions which have been already posted before
Data:
start end diff
"2020-5-16" "2029-7-15" 9 years, 2 months and etc
"2024-5-16" "2028-3-13"
"2023-4-17" "2025-4-12"
"2026-7-18" "2028-5-16"
star<-c("2020-5-16" , "2024-5-16" , "2023-4-17" , "2026-7-18")
end<-c( "2029-7-15", "2028-3-13","2025-4-12","2028-5-16")
data<-data.frame(star,end)