library(flexdashboard) library(dygraphs)
library(plotly) fig1 <- plot_ly(z = ~volcano, scene='scene1', lighting = list(ambient = 0.2)) fig1 <- fig1 %>% add_surface(showscale=FALSE) fig2 <- plot_ly(z = ~volcano, scene='scene2', lighting = list(ambient = 0.9)) fig2 <- fig2 %>% add_surface(showscale=FALSE) fig <- subplot(fig1, fig2) fig <- fig %>% layout(title = "Ambient Lighting", grid = list(rows = 1, columns = 2, pattern = 'independent'), scene = list(domain=list(column = 0), aspectmode='cube'), scene2 = list(domain=list(column = 1), aspectmode='cube')) fig
library(plotly) p <- ggplot(mpg, aes(displ, hwy)) p <- p + geom_point() + stat_smooth() fig <- ggplotly(p) fig
dygraph(fdeaths)
lungdeaths<-cbind(mdeaths,fdeaths) dygraph(lungdeaths)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.