View source: R/makeShinyCodesMulti.R
makeShinyCodesMulti | R Documentation |
Generate code files required for shiny app containing multiple datasets. In
particular, two R scripts will be generated, namely server.R
and
ui.R
. Note that makeShinyFiles
has to be ran prior to
generate the necessary data files for each of the dataset to be included.
The prefix used in makeShinyFiles
have to be then supplied in this
function.
makeShinyCodesMulti(
shiny.title,
shiny.footnotes,
shiny.prefix,
shiny.headers,
shiny.dir,
enableSubset = TRUE,
defPtSiz = 1.25,
ganalytics = NA
)
shiny.title |
specify the overall title for shiny app |
shiny.footnotes |
text for shiny app footnote. When given as a list, citation can be inserted by specifying author, title, journal, volume, page, year, doi, link. See example below. |
shiny.prefix |
specify file prefix for each dataset. Must match the
prefix used in |
shiny.headers |
specify the tab header names for each dataset. Length
must match that of |
shiny.dir |
specify directory to create the shiny app in |
enableSubset |
specify whether to enable "Toggle to subset cells" functionality in the shiny app. Default is to enable this functionality |
defPtSiz |
specify default point size for single cells. For example, a smaller size can be used if you have many cells in your dataset. A single value can be specified to set the point size for all datasets. Otherwise, users have to specify one value for each dataset |
ganalytics |
Google analytics tracking ID (e.g. "UA-123456789-0") |
server.R and ui.R required for shiny app
John F. Ouyang
# Example citation
citation = list(
author = "Liu X., Ouyang J.F., Rossello F.J. et al.",
title = "",
journal = "Nature",
volume = "586",
page = "101-107",
year = "2020",
doi = "10.1038/s41586-020-2734-6",
link = "https://www.nature.com/articles/s41586-020-2734-6")
makeShinyCodes(shiny.title = "scRNA-seq shiny app", shiny.footnotes = "",
shiny.prefix = c("sc1", "sc2"), defPtSiz = c(1.25, 1.5),
shiny.headers = c("dataset1", "dataset2"),
shiny.dir = "shinyApp/")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.