Skip to contents

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

Usage

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

# S3 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
#> 2024-01-01 0.113703411
#> 2024-02-01 0.622299405
#> 2024-03-01 0.609274733
#> 2024-04-01 0.623379442
#> 2024-05-01 0.860915384
#> 2024-06-01 0.640310605
#> 2024-07-01 0.009495756
#> 2024-08-01 0.232550506
#> 2024-09-01 0.666083758
#> 2024-10-01 0.514251141
#> 2024-11-01 0.693591292
#> 2024-12-01 0.544974836
   
## Return start and end time stamp
c(start(tS), end(tS))
#> GMT
#> [1] [2024-01-01] [2024-12-01]
range(time(tS))
#> GMT
#> [1] [2024-01-01] [2024-12-01]