The data column for time has been formatted to date before plotting by:
final$SAMPLED_DATE <- as.Date(final$SAMPLED_DATE,"%Y-%m-%d")
However, when trying to plot within Shiny, I receive the following error:
Error in as.Date.default(mjs$x$data[, as.character(mjs$x$x_accessor)], : do not know how to convert 'mjs$x$data[, as.character(mjs$x$x_accessor)]' to class “Date”
Plotting a different column which is numeric works, it's just plotting with a date that doesn't work
My code for the server side is:
final %>% mjs_plot(x=SAMPLED_DATE, y=AROMATICS) %>% mjs_point()%>% mjs_labs(x="Date", y="Density")%>% mjs_axis_x(xax_format="date")-> m1 output$mjs1 <- renderMetricsgraphics(m1)
The data column for time has been formatted to date before plotting by:
final$SAMPLED_DATE <- as.Date(final$SAMPLED_DATE,"%Y-%m-%d")
However, when trying to plot within Shiny, I receive the following error:
Error in as.Date.default(mjs$x$data[, as.character(mjs$x$x_accessor)], : do not know how to convert 'mjs$x$data[, as.character(mjs$x$x_accessor)]' to class “Date”
Plotting a different column which is numeric works, it's just plotting with a date that doesn't work My code for the server side is:
final %>% mjs_plot(x=SAMPLED_DATE, y=AROMATICS) %>% mjs_point()%>% mjs_labs(x="Date", y="Density")%>% mjs_axis_x(xax_format="date")-> m1 output$mjs1 <- renderMetricsgraphics(m1)
Any ideas why this error is popping up?