[R-SIG-Finance] Error plotting a zoo object

Baki UNAL b@kiun@l @ending from y@hoo@com
Fri Nov 16 00:32:57 CET 2018


Hello
My code is:

library(quantmod)library(tseriesChaos)library(nonlinearTseries)library(zoo)library(ggplot2)
bist100 <- getSymbols("XU100.IS", from="2011-01-01")
bist100 <- XU100.IS$XU100.IS.Close
bist100na <- na.approx(bist100)
bist100norm <- (bist100na - (min(bist100na)))/(max(bist100na) - min(bist100na))
my_rqa_det <- function(mydata) {  rqa.analysis=rqa(time.series = mydata, embedding.dim=11, time.lag=1,                   radius=0.05,lmin=2,do.plot=FALSE,distanceToBorder=2)  mydet <- rqa.analysis$DET  return(mydet)}
rollbist100norm<- rollapply(bist100norm, 260, my_rqa_det, by.column = TRUE,                             align = "right")
rollbist100normna <- na.omit(rollbist100norm)
ggplot(rollbist100normna, aes(x = date, y = det)) + geom_line()


I tried to plot "rollbist100normna" in the last line but I got the following error:


Don't know how to automatically pick scale for object of type function. Defaulting to continuous.Don't know how to automatically pick scale for object of type function. Defaulting to continuous.Error: Columns `x`, `y` must be 1d atomic vectors or listsCall `rlang::last_error()` to see a backtrace


How can I fix this problem?
Best regards.
Baki




	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list