1
votes

Even while using the sample code given in ggplotly help function... I'm continuously getting the below error

Error in map_layout(panel, plot$facet, layer_data, plot$data) :
unused argument (plot$data)

2
My guess is that some package loaded later than ggplotly has its own function called map_layout with different arguments. Can you give us the sessionInfo()?coffeinjunky
If coffeeinjubky is right you could try calling plotly directly using 'plotly::' before your function name.Ted Mosby
@coffeinjunky- I the sessionInfo() output is below. attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] devtools_1.10.0 googleVis_0.5.10 plotly_2.0.16 ggplot2_2.1.0goldilocked3149
I am having the same problem with the ggtern package.JeremyS

2 Answers

2
votes

I had the same issue and followed the solution suggested by @royr2. Specifically, I installed the development version of plotly using devtools::install_github("ropensci/plotly") and restarted my R session and reloaded the package. After that, ggplotly worked again in RStudio.

1
votes

I know this isn't an answer per se, but this has been documented as known issue with ggplot 2.1.0 - see link:

https://github.com/ropensci/plotly/issues/481