【问题标题】:Error in if (theme$lylab) { : argument is of length zeroif (theme$lylab) { 中的错误:参数长度为零
【发布时间】:2018-05-06 09:50:35
【问题描述】:
library(quantmod)
aapl<-getSymbols("aapl", auto.assign =FALSE)
head(aapl)
chart_Series(aapl, subset='2010::2010-04', 
theme =chartTheme(), 
TA="addvo();addbbands()")

运行此代码时出现此错误:

“if (theme$lylab) { : 参数长度为零时出错”

我认为这很好,因为教科书中的基本示例 但它不起作用

【问题讨论】:

    标签: r plot quantmod


    【解决方案1】:

    试试这个

    chart_Series(aapl, subset='2010::2010-04', 
                 theme =chart_theme(), 
                 TA="add_Vo();add_BBands()")
    

    chartSeries 使用addVochartTheme,但chart_Series 使用chart_themeadd_Vo 等。不要尝试将旧绘图系统与新绘图系统(使用_在函数名中)。

    【讨论】:

      猜你喜欢
      • 2016-11-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多