Create an object of class 'time'

aquifer_time(x, unit = "day")

Arguments

x

a vector of times or a daily sequence of dates

unit

time/date unit of vector x

Value

a list of class 'time' with all the required parameters for the aquifer_predict() S3 methods

Examples

aquifer_time_1 <- aquifer_time(c(0:4) * 365, unit = "day") aquifer_time_1
#> $t #> [1] 0 365 730 1095 1460 #> #> $unit #> [1] "day" #> #> $reference_date #> [1] "2020-07-04" #> #> attr(,"class") #> [1] "day" "time"
aquifer_time_2 <- aquifer_time(c(0:4), unit = "month") aquifer_time_2
#> $t #> [1] 0 1 2 3 4 #> #> $unit #> [1] "month" #> #> $reference_date #> [1] "2020-07-04" #> #> attr(,"class") #> [1] "month" "time"
aquifer_time_3 <- aquifer_time(c(0:4), unit = "year") aquifer_time_3
#> $t #> [1] 0 1 2 3 4 #> #> $unit #> [1] "year" #> #> $reference_date #> [1] "2020-07-04" #> #> attr(,"class") #> [1] "year" "time"
aquifer_time_4 <- aquifer_time(seq(as.Date("2020/1/1"), by = "year", length.out = 5), unit = "date") aquifer_time_4
#> $t #> [1] 0 366 731 1096 1461 #> #> $unit #> [1] "date" #> #> $reference_date #> [1] "2020-01-01" #> #> attr(,"class") #> [1] "day" "time"