search for: fullxt

Displaying 1 result from an estimated 1 matches for "fullxt".

Did you mean: fullxts
2017 Oct 18
1
Problem with tq_mutate_xy() from the tidyquant package
...ined example. Maybe it could be reproduced with an even smaller one ... library(tidyquant) # Loads tidyverse, tidyquant, financial pkgs, xts/zoo library(xts) dtV <- as.Date("2017-01-01") + 1:100 locL <- list( foo=xts(rnorm(100), order.by=dtV), bar=xts(rnorm(100), order.by=dtV) ) fullXts <- do.call(merge,locL) smallXts <- fullXts["2017-02-01::"] rolling_corrOnePair <- function( aXts, col1, col2, window ) { #window = window size in days tbl <- timetk::tk_tbl( aXts[,c(col1,col2)], rename_index="date" ) colnames(tbl) <- c("date",&qu...