mbal_time.Rd
Create an object of class 'time'
mbal_time(x, unit = "day")
x | a vector of times or a daily sequence of dates |
---|---|
unit | time/date unit of vector x |
a list of class 'time' with all the required parameters for the mbal_perform_oil(), mbal_perform_gas(), mbal_optim_oil(), mbal_optim_gas(), mbal_forecast_oil(), and mbal_forecast_gas() S3 methods
#> $t #> [1] 0 365 730 1095 1460 #> #> $unit #> [1] "day" #> #> $reference_date #> [1] "2020-07-14" #> #> attr(,"class") #> [1] "day" "time"#> $t #> [1] 0 1 2 3 4 #> #> $unit #> [1] "month" #> #> $reference_date #> [1] "2020-07-14" #> #> attr(,"class") #> [1] "month" "time"#> $t #> [1] 0 1 2 3 4 #> #> $unit #> [1] "year" #> #> $reference_date #> [1] "2020-07-14" #> #> attr(,"class") #> [1] "year" "time"mbal_time_4 <- mbal_time(seq(as.Date("2020/1/1"), by = "year", length.out = 5), unit = "date") mbal_time_4#> $t #> [1] 0 366 731 1096 1461 #> #> $unit #> [1] "date" #> #> $reference_date #> [1] "2020-01-01" #> #> attr(,"class") #> [1] "day" "time"