[R-SIG-Finance] FinCenter in timeSeries with "merge", "cbind" and "rbind"

Kenneth Roy Cabrera Torres krcabrer at une.net.co
Tue Jul 5 00:47:09 CEST 2011


Hi R users:

When I try to merge or bind (cbind or rbind) two series,
both with a "FinCenter" different that GMT, the
result is "GMT" not the original financial center?

What am I doing wrong?

######################################################
require(timeSeries)

getRmetricsOptions("myFinCenter")
setRmetricsOptions(myFinCenter = "America/Bogota")
getRmetricsOptions("myFinCenter")

fechas <- format(timeCalendar(2010, sample(12, 6)))
datos <- matrix(round(rnorm(6), 3))
t1 <- sort(timeSeries(datos, fechas, units = "A"))
t1
 
fechas <- format(timeCalendar(2010, sample(12, 6)))
datos <- matrix(round(rnorm(6), 3))
t2 <- sort(timeSeries(datos, fechas, units = "B"))
t2

merge(t1,t2)
cbind(t1,t2)
rbind(t1,t2)
######################################################

Thank you for your help.

Kenneth



More information about the R-SIG-Finance mailing list