Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephanie Wegscheidl
cocoVisR
Commits
f06cdde1
Commit
f06cdde1
authored
Jul 21, 2018
by
Stephanie
Browse files
coconut.json upload and reading works
parent
704e8bcf
Changes
2
Hide whitespace changes
Inline
Side-by-side
dashboard/server.R
View file @
f06cdde1
...
...
@@ -9,28 +9,36 @@
library
(
shiny
)
library
(
jsonlite
)
#library(DT)
server
<-
function
(
input
,
output
)
{
set.seed
(
122
)
output
$
data
<-
renderTable
({
inFile
<-
input
$
file1
output
$
file1
<-
renderDataTable
({
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"
]]
#coconut.df$timestamp <- anytime((as.numeric(coconut.df$timestamp)/1000))
})
output
$
file2
<-
renderDataTable
({
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
)
#read.csv(inFile$datapath, header = input$header)
print
(
"filename: "
)
print
(
inFile
$
name
)
print
(
"filepath: "
)
print
(
inFile
$
datapath
)
json_file
<-
paste
(
inFile
$
datapath
,
inFile
$
name
,
sep
=
""
)
json_data_coco
<-
fromJSON
(
paste
(
json_file
,
sep
=
""
),
flatten
=
TRUE
)
prin
(
"json_data_coco"
)
print
(
json_data_coco
)
})
#data<-reactive({
...
...
dashboard/ui.R
View file @
f06cdde1
...
...
@@ -46,10 +46,14 @@ ui <- dashboardPage(
#show data tab content
tabItem
(
tabName
=
"data"
,
h2
(
"CoConUT Data here:"
),
textOutput
(
"data"
),
h2
(
"CoCoQuest Data here:"
)
h2
(
"CoConUT Data here:"
),
dataTableOutput
(
"file1"
),
h2
(
"CoCoQuest Data here:"
),
dataTableOutput
(
"file2"
)
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment