Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
migale
affiliationExplorer
Commits
7e6ec620
Commit
7e6ec620
authored
Jan 23, 2020
by
Sandra Derozier
Browse files
Test Download Button
parent
61c53484
Changes
2
Hide whitespace changes
Inline
Side-by-side
R/app_server.R
View file @
7e6ec620
...
...
@@ -30,17 +30,21 @@ app_server <- function(input, output, session) {
amb
<-
find_level
(
data
)
output
$
txt
<-
renderUI
({
paste
(
input
$
asv
,
"- "
,
nrow
(
data
)
,
" affiliation, ambiguity at rank "
,
amb
)})
output
$
table
<-
DT
::
renderDT
({
data
},
selection
=
'single'
)
#output$selection <- renderUI({paste(output$table$tableId_rows_selected)})
output
$
selection
<-
renderUI
({
s
=
input
$
table_rows_selected
if
(
length
(
s
))
{
# cat('These rows were selected: ')
# cat(s, sep = ', ')
paste
(
"These rows were selected: "
,
s
)
}
})
})
output
$
download
<-
downloadHandler
(
filename
=
function
()
{
paste
(
'data-'
,
Sys.Date
(),
'.csv'
,
sep
=
''
)
},
content
=
function
(
con
)
{
write.csv
(
data
,
con
)
})
})
}
\ No newline at end of file
R/app_ui.R
View file @
7e6ec620
...
...
@@ -15,11 +15,11 @@ app_ui <- function() {
dashboardSidebar
(
fileInput
(
"biom"
,
"Upload Biom File"
,
accept
=
c
(
".biom"
)
accept
=
c
(
"text/plain"
,
".biom"
)
),
fileInput
(
"tsv"
,
"Upload MultiHits TSV File"
,
accept
=
c
(
"text/
csv"
,
".t
sv"
)
accept
=
c
(
"text/
tab-separated-values"
,
".tsv"
,
"text/c
sv"
)
),
textOutput
(
"tmp"
)
),
...
...
@@ -35,7 +35,10 @@ app_ui <- function() {
HTML
(
"<br/>"
),
DT
::
DTOutput
(
"table"
),
HTML
(
"<br/>"
),
htmlOutput
(
"selection"
)
htmlOutput
(
"selection"
),
HTML
(
"<br/>"
),
actionButton
(
"clean"
,
"Clean ASV"
),
downloadButton
(
"download"
,
"Download"
)
)
)
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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