Displaying 1 result from an estimated 1 matches for "col_rename".
Did you mean:
col_name
2017 Oct 18
1
Problem with tq_mutate_xy() from the tidyquant package
...;date","x","y")
naV <- sapply(1:nrow(tbl), function(i) any(is.na(tbl[i,])) )
tbl <- tbl[!naV,]# remove any rows with NAs
tq_mutate_xy( data=tbl, x = x, y = y, mutate_fun=runCor,
n = window, use="all.obs", # runCor args
col_rename = "rolling_corr" ) # tq_mutate args
}
foo <- rolling_corrOnePair( aXts=smallXts, col1="foo", col2="bar",
window=30 )
## This produces the error
# Error in runCov(x, y, n, use = use, sample = sample, cumulative ) :
# n = 30 is outside valid range: [1, 1]
Thanks...