문제

I would like to use a colour palate for charts.PerformanceSummary in the PerformanceAnalytics package, but for some reason it is not displaying all three graphs.

Below is a reproducible example.

library(PerformanceAnalytics)
n <- 12
d <- 1000
v <- xts(matrix(rnorm(n*d,0.0001,0.003),ncol=n),Sys.Date()-c(1:d))
colnames(v) <- LETTERS[1:n]
charts.PerformanceSummary(v,col=rainbow12equal)

Error in plot.xy(xy.coords(x, y), type = type, ...) : 
  formal argument "col" matched by multiple actual arguments

Any help would be greatly appreciated.

도움이 되었습니까?

해결책

looks like you should set colorset not col:

charts.PerformanceSummary(v,colorset=rainbow12equal)

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top