Hi,
How do I use function summarise inside of a renderplot?
I tried this way, but can't plot in the dashboard.
The code is:
dados3 <- reactive({
global %>%
select(input$var1, input$var2,ano)%>%
rename(Y3var = input$var1, Z3var = input$var2) %>%
group_by(dados3()$Z3var,ano) %>%
summarise(Mean = mean(dados3()$Y3var, na.rm = TRUE))
})
renderPlotly({
c<-dados3() %>%
plot_ly(df, x = ~ano, y=Mean, color =dados3()$Z3var,type="scatter", mode = "line",
colors = colors) %>%
layout(xaxis = list(title = "ano"),
yaxis = list(title = "variável"))
c
})
and the error is:
Problem with mutate()
input ..1
.
e[31mxe[39m Problem with mutate()
input ..1
.
e[31mxe[39m Problem with mutate()
input ..1
.
e[31mxe[39m Problem with mutate()
input ..1
.
e[31mxe[39m Problem with mutate()
input ..1
.
e[31mxe[39m Problem with mutate()
input ..1
.
(...)
Thanks!