r - Extracting the numerical values of a xts object -


i want extract numerical values of xts object. let's @ example

data <- new.env() starting.date <- as.date("2006-01-01") nlookback <- 20 getsymbols("ubs", env = data, src = "yahoo", = starting.date) reg.curve <- rollapply(cl(data$ubs), nlookback, mean, align="right") 

the reg.cuve still xts object i'm interested in running means. how can modify reg.curve numerical vector?

use coredata:

reg.curve.num <- coredata(reg.curve) # or, if want vector: reg.curve.num <- drop(coredata(reg.curve)) 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -