The plot
function of some packages like timetk
, plot_ly
does not produce the plot(output)
written inside renderPlot
function. Although the same piece of code returns the output(plot)
when I run it in console. Whereas function like plot()
, ggplot()
does the work too.
Why is that so?
This piece of code with timetk library provide the output in rstudio console:
dataset %>%
plot_time_series(.date_var = Year, .value = column1,
.interactive = TRUE, .y_lab = "Amt", .x_lab = "Year",
)
But if this same piece is written inside renderPlot
function, it does not provide the output on RShiny app, just shows a blank white screen.
UI: UI code is all good. I also have written an plotOutput("p1")
too.
Server:
output$p1 <- renderPlot({
dataset %>%
plot_time_series(.date_var = Year, .value = column1,
.interactive = TRUE, .y_lab = "Amt", .x_lab = "Year",
)
})