Skip to contents

Build a time-series value object for create_observed_data()'s time argument. Carries the time grid x-values and their unit.

Usage

time(value, unit = "h")

Arguments

value

Numeric vector. Time grid x-values.

unit

Character. Unit for value, validated against dimension "Time". Defaults to "h".

Value

A time_spec object to pass to create_observed_data().

Examples

time(c(0, 1, 2, 4, 8))
#> $value
#> [1] 0 1 2 4 8
#> 
#> $unit
#> [1] "h"
#> 
#> attr(,"class")
#> [1] "time_spec"      "osp_value_spec"