makeShinyCodes: Generate code files required for shiny app (one dataset)

View source: R/makeShinyCodes.R

makeShinyCodesR Documentation

Generate code files required for shiny app (one dataset)

Description

Generate code files required for shiny app containing only one dataset. In particular, two R scripts will be generated, namely server.R and ui.R. If users want to include multiple dataset in one shiny app, please use makeShinyCodesMulti() instead. Note that both makeShinyFiles and makeShinyCodes functions are ran when running the wrapper function makeShinyApp.

Usage

makeShinyCodes(
  shiny.title,
  shiny.footnotes,
  shiny.prefix,
  shiny.dir,
  enableSubset = TRUE,
  defPtSiz = 1.25,
  ganalytics = NA
)

Arguments

shiny.title

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

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

ganalytics

Google analytics tracking ID (e.g. "UA-123456789-0")

Value

server.R and ui.R required for shiny app

Author(s)

John F. Ouyang

Examples

# 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 = "sc1", shiny.dir = "shinyApp/")


SGDDNB/ShinyCell documentation built on Jan. 25, 2024, 3:19 p.m.