The nedaps function creates a copy of the Nedap dataset and adjusts the visit times to align with the current date while maintaining the original time patterns.

nedaps()

Value

A data.table with updated visit times, shifted to the current date

Details

The function performs the following operations:

  • Creates a copy of the Nedap dataset from the mintyr package

  • Calculates the number of days between the last recorded visit and the previous day

  • Shifts all visit times forward by the calculated number of days

  • Preserves the original time patterns of the visits

Note

  • Requires the data.table and mintyr packages

  • Uses the current system date as a reference for date shifting

  • Maintains the original time of day for each visit

Examples

head(nedaps())
#>    animal_number lifenumber responder location          visit_time duration
#>            <int>     <lgcl>     <int>    <int>              <POSc>    <int>
#> 1:      10115497         NA     15497      101 2024-09-05 20:22:51        3
#> 2:      10115967         NA     15967      101 2024-09-05 20:22:54       65
#> 3:      10115983         NA     15983      101 2024-09-05 20:23:59        2
#> 4:      10115967         NA     15967      101 2024-09-05 20:24:01       11
#> 5:      10115983         NA     15983      101 2024-09-05 20:24:12        2
#> 6:      10115967         NA     15967      101 2024-09-05 20:24:14       33
#>    state weight feed_intake
#>    <int>  <int>       <int>
#> 1:     0  46500           0
#> 2:     0  22000          17
#> 3:     0  33000           0
#> 4:     0  33500           0
#> 5:     0  35500           0
#> 6:     0  31000           0