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
migale
affiliationExplorer
Commits
180844be
Commit
180844be
authored
Feb 14, 2020
by
Sandra Derozier
Browse files
ShinyJS - Show/Hide Buttons
parent
e6af8667
Changes
4
Hide whitespace changes
Inline
Side-by-side
NAMESPACE
View file @
180844be
...
...
@@ -5,6 +5,7 @@ export(run_app)
import(shiny)
import(shinycssloaders)
import(shinydashboard)
import(shinyjs)
importFrom(DT,renderDT)
importFrom(glue,glue)
importFrom(golem,with_golem_options)
...
...
R/app_server.R
View file @
180844be
...
...
@@ -2,6 +2,7 @@
#' @importFrom DT renderDT
#' @importFrom phyloseq tax_table
#' @importFrom phyloseq.extended write_phyloseq
#' @import shinyjs
app_server
<-
function
(
input
,
output
,
session
)
{
# Load package data in the session (for testing purpose)
# data("physeq", package = "affiliationExplorer")
...
...
@@ -9,7 +10,17 @@ app_server <- function(input, output, session) {
# data("otu_dictionary", package = "affiliationExplorer")
# List the first level callModules here
shinyjs
::
hide
(
"clean"
)
shinyjs
::
hide
(
"download"
)
output
$
tmptxt
<-
renderUI
(
"Please upload your data (Biom file and MultiHits TSV file)."
)
observeEvent
(
input
$
tsv
,
{
shinyjs
::
show
(
"clean"
)
shinyjs
::
show
(
"download"
)
output
$
tmptxt
<-
renderUI
(
""
)
# Read the biom file --> phyloseq
biomfile
<-
read_frogs_biom
(
input
$
biom
$
datapath
)
# Read the tsv file --> readr
...
...
R/app_ui.R
View file @
180844be
#' @import shiny
#' @import shinycssloaders
#' @import shinydashboard
#' @import shinyjs
app_ui
<-
function
()
{
tagList
(
# Leave this function for adding external resources
...
...
@@ -26,11 +27,13 @@ app_ui <- function() {
# DashBooard Body
dashboardBody
(
fluidPage
(
useShinyjs
(),
fluidRow
(
box
(
title
=
"Affiliation selection"
,
width
=
NULL
,
status
=
"primary"
,
solidHeader
=
T
,
htmlOutput
(
"tmptxt"
),
htmlOutput
(
"txt"
),
HTML
(
"<br/>"
),
DT
::
DTOutput
(
"table"
),
...
...
dev/02_dev.R
View file @
180844be
...
...
@@ -21,6 +21,7 @@ usethis::use_package( "phyloseq" ) # To call each time you need a new package
usethis
::
use_package
(
"biomformat"
)
usethis
::
use_package
(
"dplyr"
)
usethis
::
use_package
(
"tidyr"
)
usethis
::
use_package
(
"shinyjs"
)
## Github dependencies
usethis
::
use_dev_package
(
"phyloseq.extended"
)
...
...
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