library(shiny)
library(plotly)
library(dplyr)
library(scales)
library(reticulate)
source_python("cems_api.py")
ui <- fluidPage(
plotlyOutput("plot")
)
server <- function(input, output) {
# renderPlotly() also understands ggplot2 objects!
output$plot <- renderPlotly({
SO_table$polno <- as.factor(unlist(SO_table$polno))
SO_table$m_time <- as.POSIXct(SO_table$m_time, format="%Y/%m/%d %H:%M")
SO_ggplot<- SO_table %>% ggplot(aes(x = m_time, y = m_val, color=polno)) +
geom_point() +
geom_line()+
theme_bw()+
labs(y="ppm")+
scale_x_datetime(date_labels="%m/%d %H:%M:%S")
SO_linechart <- ggplotly(SO_ggplot)
})
}
shinyApp(ui, server)
Hello, everyone. There is a big problem in the code which I can't handle. It shows that:
Warning: Error in isReallyReal: x must be of type double.
But I have set and checked class and typeof are the same as the dataset in the example. So, I don't know how to solve it. Can someone teach me?
Here are my code and file needed. https://drive.google.com/open?id=12JPV9AaLfoCBb_VsFJOiDowdQHwOu_Qy