I have a data frame looking like this:
Date Species 00:00 02:00 04:00 06:00 08:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00
01.05.2019 A 0 0 0 0 0 2 5 8 0 0 0 0
02.05.2019 A 0 0 0 8 0 4 3 0 0 0 0 0
The numbers are bihourly values that were recorded during a duration of 2 hours, e.g. between 0 am and 2 am.
For the R package that I want to use the table needs to look like this:
Species from to value
A 01.05.2019 00:00 01.05.2019 02:00 0
A 01.05.2019 02:00 01.05.2019 04:00 0
A 01.05.2019 04:00 01.05.2019 06:00 0
A 01.05.2019 06:00 01.05.2019 08:00 0
A 01.05.2019 08:00 01.05.2019 10:00 0
A 01.05.2019 10:00 01.05.2019 12:00 2
A 01.05.2019 12:00 01.05.2019 14:00 5
A 01.05.2019 14:00 01.05.2019 16:00 8
A 01.05.2019 16:00 01.05.2019 18:00 0
A 01.05.2019 18:00 01.05.2019 20:00 0
A 01.05.2019 20:00 01.05.2019 22:00 0
A 01.05.2019 22:00 02.05.2019 00:00 0
A 02.05.2019 00:00 01.05.2019 02:00 0
A 02.05.2019 02:00 01.05.2019 04:00 0