Transform two dates (defining an episode) into a data.table with 6 columns:

Episod2ymd(start.date, end.date)

Arguments

start.date

Vector with start dates of episod

end.date

Vector with ending dates of the episode

Value

data.table con columnas: Start_year Start_month Start_day End_year End_month End_day

Details

Start_Year Start_Month Start_Day End_Year End_Month End_Day

Examples

dt.date <- ddate2date.3d(1985 + seq(0,1,by=.1)) Episod2ymd(dt.date$start.date,dt.date$end.date)
#> Start_year Start_month Start_day End_year End_month End_day #> 1: 1985 1 1 1985 2 5 #> 2: 1985 2 6 1985 3 14 #> 3: 1985 3 15 1985 4 19 #> 4: 1985 4 20 1985 5 26 #> 5: 1985 5 27 1985 7 1 #> 6: 1985 7 2 1985 8 7 #> 7: 1985 8 8 1985 9 12 #> 8: 1985 9 13 1985 10 19 #> 9: 1985 10 20 1985 11 24 #> 10: 1985 11 25 1985 12 31 #> 11: 1986 1 1 1986 2 6