Closed RoelVerbelen closed 4 years ago
Yes, plots don't show up during non-interactive mode (See this SO answer). There is no silver bullet here, so I chose to have it printed by default.
For your R Markdown use case, I suggest separating the code block into an include=FALSE
section:
```{r create, include=FALSE}
library(DataExplorer)
library(plotly)
out <- plot_correlation(iris)
Then call the output from another block:
````R
```{r plot}
ggplotly(out)
Thanks for your response. I understand the trade-off. In R markdown, the workaround is easy enough.
Thanks for your package! I'm using your
plot_correlation()
function in an R Markdown and am converting it to a plotly graphic viaggplotly()
:However, this command leads to first plotting it as a ggplot object and then as a plotly object.
This could be solved/prevented by deleting the
print(plot_obj)
line inDataExplorer:::plotDataExplorer.single()
. The ggplot object is returned invisibly in the last line anyway. Would that be something you would consider doing or would it break your functionality elsewhere?