Skip to contents

Returns start or end time stamp of a "timeSeries" object.

Usage

# S4 method for timeSeries
start(x, ...)

# S4 method for timeSeries
end(x, ...)

Arguments

x

an uni- or multivariate "timeSeries" object.

...

optional arguments passed to other methods.

Value

a "timeSeries" object

Examples

set.seed(1234)
## Create a dummy \code{"timeSeries"} -    
   tS <- dummyMonthlySeries()[, 1]
   tS
#> GMT
#>                   TS.1
#> 2023-01-01 0.113703411
#> 2023-02-01 0.622299405
#> 2023-03-01 0.609274733
#> 2023-04-01 0.623379442
#> 2023-05-01 0.860915384
#> 2023-06-01 0.640310605
#> 2023-07-01 0.009495756
#> 2023-08-01 0.232550506
#> 2023-09-01 0.666083758
#> 2023-10-01 0.514251141
#> 2023-11-01 0.693591292
#> 2023-12-01 0.544974836
   
## Return start and end time stamp -
   c(start(tS), end(tS))
#> GMT
#> [1] [2023-01-01] [2023-12-01]
   range(time(tS))
#> GMT
#> [1] [2023-01-01] [2023-12-01]