R 将静态平滑黄土线添加到动态图

R 将静态平滑黄土线添加到动态图,r,shiny,time-series,dygraphs,loess,R,Shiny,Time Series,Dygraphs,Loess,我不知道这些数据是否有用,但我有两个简单的时间序列: > cost_ts 2020-01-01 -100 2020-02-01 -200 2020-03-01 -100 > inc_ts 2020-01-01 110 2020-02-01 210 2020-03-01 110 我把它组合成一个动态图: cost_v_inc <- cbind(cost_ts, inc_ts) dygraph(cost_v_inc) p <- dygraph(cost_v_inc) p

我不知道这些数据是否有用,但我有两个简单的时间序列:

> cost_ts
2020-01-01 -100
2020-02-01 -200
2020-03-01 -100

> inc_ts
2020-01-01 110
2020-02-01 210
2020-03-01 110
我把它组合成一个动态图:

cost_v_inc <- cbind(cost_ts, inc_ts)
dygraph(cost_v_inc)
p <- dygraph(cost_v_inc)
p + stat_smooth(color = "#FC4E07", fill = "#FC4E07",method = "loess")
cost_v_公司