I am trying to convert a ggplot object to design and show it in a brilliant application. But I ran into the error "not applicable method for" plotly_build "applied to an object of class" NULL ""
I managed to successfully return the ggplot object to a brilliant application,
output$plot1 <- renderplot({ gp <- ggplot(data = mtcars, aes(x = disp, y = cyl)) + geom_smooth(method = lm, formula = y~x) + geom_point() + theme_gdocs() })
but somehow he cannot transform it.
My code is as follows
output$plot2 <- renderplotly({ gp <- ggplot(data = mtcars, aes(x = disp, y = cyl)) + geom_smooth(method = lm, formula = y~x) + geom_point() + theme_gdocs() ggplotly() })
r shiny ggplot2 plotly
athlonshi
source share