Running examples in 'plotly-Ex.R' failed
The error most likely occurred in:

> ### Name: add_trace
> ### Title: Add trace(s) to a plotly visualization
> ### Aliases: add_trace add_markers add_text add_paths add_lines
> ###   add_segments add_polygons add_sf add_table add_ribbons add_area
> ###   add_pie add_bars add_histogram add_histogram2d add_histogram2dcontour
> ###   add_heatmap add_contour add_boxplot add_surface add_mesh
> ###   add_scattergeo add_choropleth
> 
> ### ** Examples
> 
> 
> # the `plot_ly()` function initiates an object, and if no trace type
> # is specified, it sets a sensible default
> p <- plot_ly(economics, x = ~date, y = ~uempmed)
> p
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plot.ly/r/reference/#scatter
No scatter mode specifed:
  Setting the mode to markers
  Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode
> 
> # some `add_*()` functions are a specific case of a trace type
> # for example, `add_markers()` is a scatter trace with mode of markers
> add_markers(p)
> 
> # scatter trace with mode of text
> add_text(p, text = "%")
> 
> # scatter trace with mode of lines 
> add_paths(p)
> 
> # like `add_paths()`, but ensures points are connected according to `x`
> add_lines(p)
> 
> # if you prefer to work with plotly.js more directly, can always
> # use `add_trace()` and specify the type yourself
> add_trace(p, type = "scatter", mode = "markers+lines")
> 
> # mappings provided to `plot_ly()` are "global", but can be overwritten
> plot_ly(economics, x = ~date, y = ~uempmed, color = I("red"), showlegend = FALSE) %>% 
+   add_lines() %>%
+   add_markers(color = ~pop)
> 
> # a number of `add_*()` functions are special cases of the scatter trace
> plot_ly(economics, x = ~date) %>% 
+   add_ribbons(ymin = ~pce - 1e3, ymax = ~pce + 1e3)
Error in `[[<-.data.frame`(`*tmp*`, i, value = c(-915L, -884L, -853L,  : 
  replacement has 575 rows, data has 574
Calls: <Anonymous> ... [<-.data.frame -> xpdrows.data.frame -> [[<- -> [[<-.data.frame
Execution halted