I am making an application for analyzing time series data using Shiny. The data I'm working with is as follows:
V1 V2 1 2013-02-04 18:15:00 -4.746 2 2013-02-04 18:20:00 -4.745 3 2013-02-04 18:25:00 -4.746 4 2013-02-04 18:30:00 -4.747 5 2013-02-04 18:35:00 -4.747 6 2013-02-04 18:40:00 -4.747
I want to build data in a table:
output$view <- renderTable({ head(datasubset(), n=nrow(datasubset())) })
By doing this, I get an error when starting Shiny:
Error in Math.POSIXt(x + ifelse(x == 0, 1, 0)) : 'abs' not defined for "POSIXt" objects
Does anyone have a solution to this error?
UPDATE: the error is caused by xtable: renderTable uses xtable () to generate output, and it seems that xxtable does not work well with dates in general.
The problem was filed here by Winston Chang: https://github.com/rstudio/shiny/issues/129
A workaround is available at: R: xtable and dates
source share