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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -