library(flexdashboard)
library(dygraphs)

Column {data-width=650 .tabset .tabset-fade}

Chart A1

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

Chart A2

library(plotly)

p <- ggplot(mpg, aes(displ, hwy))
p <- p + geom_point() + stat_smooth()

fig <- ggplotly(p)

fig

Column {data-width=350}

Chart B

dygraph(fdeaths)

Chart C

lungdeaths<-cbind(mdeaths,fdeaths)
dygraph(lungdeaths)


MATHSTATSOU/Intro2MLR documentation built on Dec. 11, 2020, 9:01 p.m.