Black Lives Matter. Please consider donating to Black Girls Code today.
Dash Enterprise delivers an incredible 21x cost savings 💸Download the e-book!

"api_create" function not found in plotly R package

I have Plotly installed on 64-bit Debian GNU/Linux 9 (stretch) and everything is working fine: Using RStudio, I’m able to plot nice, interactive figures.

However, as I try to store the images into the Plotly server with the function call:

api_create( p, filename = "new_plot" )

I get an error message:

Error: could not find function "api_create"

As I try to browse the available functions of the plotly R package with


I can’t find any of the api functions.

What could be wrong?

Some further info:

I’m running R version 3.3.3 (2017-03-06) and I just updated the plotly package to plotly_4.7.1.

Still, there is no api_create function:

> plotly::
plotly::add_histogram2d           plotly::add_annotations           plotly::to_basic
plotly::as_widget                 plotly::subplot                   plotly::add_lines
plotly::add_histogram             plotly::add_mesh                  plotly::add_segments
plotly::groups                    plotly::mutate                    plotly::add_boxplot
plotly::offline                   plotly::event_data                plotly::add_fun
plotly::summarise_                plotly::plotly_IMAGE              plotly::add_bars
plotly::add_paths                 plotly::add_ribbons               plotly::gg2list
plotly::ungroup                   plotly::add_heatmap               plotly::get_figure
plotly::plotly_POST               plotly::as.widget                 plotly::knit_print.plotly_figure
plotly::plotly_json               plotly::slice                     plotly::distinct_
plotly::do                        plotly::%>%                       plotly::add_histogram2dcontour
plotly::last_plot                 plotly::ggplotly                  plotly::filter
plotly::layout                    plotly::add_surface               plotly::signup
plotly::toRGB                     plotly::rename_                   plotly::renderPlotly
plotly::slice_                    plotly::toWebGL                   plotly::arrange_
plotly::hide_guides               plotly::embed_notebook            plotly::group_by_
plotly::filter_                   plotly::add_text                  plotly::select
plotly::plot_geo                  plotly::transmute                 plotly::plotly_build
plotly::add_area                  plotly::summarise                 plotly::hide_legend
plotly::rename                    plotly::schema                    plotly::plotlyOutput
plotly::plotly_data               plotly::add_trace                 plotly::add_data
plotly::geom2trace                plotly::add_pie                   plotly::arrange
plotly::config                    plotly::add_markers               plotly::group_by
plotly::add_polygons              plotly::plot_mapbox               plotly::plotly
plotly::export                    plotly::distinct                  plotly::colorbar
plotly::add_choropleth            plotly::style                     plotly::rangeslider
plotly::transmute_                plotly::plot_ly                   plotly::hide_colorbar
plotly::add_scattergeo            plotly::plotly_empty              plotly::select_
plotly::mutate_                   plotly::add_contour               plotly::do_

Ok. I just had to remove the package and then re-install it. Now also the api functions are there.

If someone could explain why this happened, I would be grateful.