Commit d88a581e authored by Stephanie's avatar Stephanie

Data view of coconut.json works, looking good, cocoquest.json has to be 2-Dimensional --> error

parent f06cdde1
......@@ -9,19 +9,33 @@
library(shiny)
library(jsonlite)
#library(DT)
library(DT)
server <- function(input, output) {
set.seed(122)
output$file1 <- renderDataTable({
inFile <- input$file1
if (is.null(inFile))
return(NULL)
inFile <- input$file1
if (is.null(inFile))
return(NULL)
json_data_coco <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
coconut.df <- json_data_coco[["data"]]
json_data_coco <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
coconut.df <- json_data_coco[["data"]]
datatable(
cbind(coconut.df),
options = list(
searching = TRUE,
autoWidth = TRUE,
rownames = FALSE,
scroller = TRUE,
scrollX = TRUE,
scrollY = "500px",
fixedHeader = TRUE,
class = 'cell-border stripe'
)
)
#coconut.df$timestamp <- anytime((as.numeric(coconut.df$timestamp)/1000))
......@@ -33,11 +47,11 @@ server <- function(input, output) {
inFile <- input$file2
if (is.null(inFile))
return(NULL)
scrollX=TRUE
json_data_quest <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
print("json_data_quest ")
print(json_data_quest)
json_data_quest <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
#json_data <-map()
#print(json_for_from)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment