0

I am using Plotly package on RStudio. I try to use the function windows() that pops up a new window where the plot should be inserted. This function works well with the normal R function plot, ggplot... but it is not working with plotly graphs.

Here is my code:

windows()

p <- as.doubleplot_ly(data = prices_st, y = prices_st$values, group = prices_st$ind) %>%
  layout(showlegend = FALSE)

And the error message is

Error: (list) object cannot be coerced to type 'double'
alistaire
  • 42,459
  • 4
  • 77
  • 117
sayfin
  • 1
  • 2
    Can you make this question [reproducible](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? The question is rather weak and, since you don't show what the data looks like, you're unlikely to get much help. – r2evans Oct 05 '16 at 04:00
  • If you're using RStudio, you shouldn't need to do anything to view a plotly plot; it should just show up in the viewer when you print it (in this case, call `p`). Also, if you're specifying a data.frame, you shouldn't use `$` notation for the other parameters. You may need to quote them with `~`, though, depending on what version of plotly you're using. – alistaire Oct 05 '16 at 04:34
  • Thank you guys for your time. I can add some data, but I am not having a problem producing a chart. The issue is that I want to show different graphs on different pop up windows at the same time. The R function windows() when followed in the code by a plot function creates a pop-up window that contains this graph. But the same function function when the graph is generated with plotly just shows a blank pop-up window and the graph is plotted on the viewer. – sayfin Oct 06 '16 at 11:51

0 Answers0