8000 remove forecasting example · plotly/plotly.r-docs@c1bfa26 · GitHub
[go: up one dir, main page]

Skip to content

Commit c1bfa26

Browse files
author
Joseph Damiba
committed
remove forecasting example
1 parent 02dbda3 commit c1bfa26

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

r/2015-07-30-graphing-multiple-chart-types.Rmd

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,6 @@ fig <- fig %>% layout(xaxis = list(title = 'Displacement (cu.in.)'),
5757
fig
5858
```
5959

60-
### Plotting Forecast Objects
61-
62-
```{r}
63-
library(plotly)
64-
library(forecast)
65-
66-
fit <- ets(USAccDeaths)
67-
fore <- forecast(fit, h = 48, level = c(80, 95))
68-
69-
fig <- plot_ly()
70-
fig <- fig %>% add_lines(x = time(USAccDeaths), y = USAccDeaths,
71-
color = I("black"), name = "observed")
72-
fig <- fig %>% add_ribbons(x = time(fore$mean), ymin = fore$lower[, 2], ymax = fore$upper[, 2],
73-
color = I("gray95"), name = "95% confidence")
74-
fig <- fig %>% add_ribbons(x = time(fore$mean), ymin = fore$lower[, 1], ymax = fore$upper[, 1],
75-
color = I("gray80"), name = "80% confidence")
76-
fig <- fig %>% add_lines(x = time(fore$mean), y = fore$mean, color = I("blue"), name = "prediction")
77-
78-
fig
79-
```
80-
8160
### Loess Smoother with Uncertainty Bounds
8261

8362
```{r}

0 commit comments

Comments
 (0)
0