Get and set Financial center of a 'timeSeries'
timeSeries-slotFinCenter.Rd
Get or assign a financial center to a "timeSeries"
object.
Usage
# S4 method for timeSeries
finCenter(x)
# S4 method for timeSeries
finCenter(x) <- value
getFinCenter(x)
setFinCenter(x) <- value
Arguments
- x
a
"timeSeries"
object.- value
a character with the the location of the financial center named as
"continent/city"
.
See also
listFinCenter
and finCenter
in package "timeDate"
Examples
## An artificial 'timeSeries' Object -
tS <- dummyMonthlySeries()
tS
#> GMT
#> TS.1 TS.2
#> 2024-01-01 0.21879954 0.2012480
#> 2024-02-01 0.81059855 0.2588098
#> 2024-03-01 0.52569755 0.9921504
#> 2024-04-01 0.91465817 0.8073523
#> 2024-05-01 0.83134505 0.5533336
#> 2024-06-01 0.04577026 0.6464061
#> 2024-07-01 0.45609148 0.3118243
#> 2024-08-01 0.26518667 0.6218192
#> 2024-09-01 0.30467220 0.3297702
#> 2024-10-01 0.50730687 0.5019975
#> 2024-11-01 0.18109621 0.6770945
#> 2024-12-01 0.75967064 0.4849912
## Print Financial Center -
finCenter(tS)
#> [1] "GMT"
getFinCenter(tS)
#> [1] "GMT"
## Assign New Financial Center -
finCenter(tS) <- "Zurich"
tS
#> Zurich
#> TS.1 TS.2
#> 2024-01-01 01:00:00 0.21879954 0.2012480
#> 2024-02-01 01:00:00 0.81059855 0.2588098
#> 2024-03-01 01:00:00 0.52569755 0.9921504
#> 2024-04-01 02:00:00 0.91465817 0.8073523
#> 2024-05-01 02:00:00 0.83134505 0.5533336
#> 2024-06-01 02:00:00 0.04577026 0.6464061
#> 2024-07-01 02:00:00 0.45609148 0.3118243
#> 2024-08-01 02:00:00 0.26518667 0.6218192
#> 2024-09-01 02:00:00 0.30467220 0.3297702
#> 2024-10-01 02:00:00 0.50730687 0.5019975
#> 2024-11-01 01:00:00 0.18109621 0.6770945
#> 2024-12-01 01:00:00 0.75967064 0.4849912
setFinCenter(tS) <- "New_York"
tS
#> New_York
#> TS.1 TS.2
#> 2023-12-31 19:00:00 0.21879954 0.2012480
#> 2024-01-31 19:00:00 0.81059855 0.2588098
#> 2024-02-29 19:00:00 0.52569755 0.9921504
#> 2024-03-31 20:00:00 0.91465817 0.8073523
#> 2024-04-30 20:00:00 0.83134505 0.5533336
#> 2024-05-31 20:00:00 0.04577026 0.6464061
#> 2024-06-30 20:00:00 0.45609148 0.3118243
#> 2024-07-31 20:00:00 0.26518667 0.6218192
#> 2024-08-31 20:00:00 0.30467220 0.3297702
#> 2024-09-30 20:00:00 0.50730687 0.5019975
#> 2024-10-31 20:00:00 0.18109621 0.6770945
#> 2024-11-30 19:00:00 0.75967064 0.4849912