diff --git a/NAMESPACE b/NAMESPACE index 29205c5..6c9ad7c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,7 @@ # Generated by roxygen2: do not edit by hand export(analyze) +export(app) export(box_plot) export(overview_plot) export(rank_genes) diff --git a/R/app.R b/R/app.R index eab618b..7e56ce5 100644 --- a/R/app.R +++ b/R/app.R @@ -5,20 +5,34 @@ #' @param custom_dataset This allows to set a custom dataset (return value of #' [analyze()]) as the default dataset of the UI. #' +#' @seealso [app()] for retrieving a Shiny app object. +#' #' @export run_app <- function(host = "127.0.0.1", port = 3464, custom_dataset = NULL) { runApp( - shinyApp( - ui(custom_dataset = custom_dataset), - server(custom_dataset = custom_dataset) - ), + app(custom_dataset = custom_dataset), host = host, port = port ) } +#' Create a shiny application for Ubigen. +#' +#' @param custom_dataset This allows to set a custom dataset (return value of +#' [analyze()]) as the default dataset of the UI. +#' +#' @seealso [run_app()] for immediately running the application. +#' +#' @export +app <- function(custom_dataset = NULL) { + shinyApp( + ui(custom_dataset = custom_dataset), + server(custom_dataset = custom_dataset) + ) +} + #' Run the Ubigen API. #' #' This requires the `plumber` package to be installed. diff --git a/man/app.Rd b/man/app.Rd new file mode 100644 index 0000000..28176f6 --- /dev/null +++ b/man/app.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/app.R +\name{app} +\alias{app} +\title{Create a shiny application for Ubigen.} +\usage{ +app(custom_dataset = NULL) +} +\arguments{ +\item{custom_dataset}{This allows to set a custom dataset (return value of +\code{\link[=analyze]{analyze()}}) as the default dataset of the UI.} +} +\description{ +Create a shiny application for Ubigen. +} +\seealso{ +\code{\link[=run_app]{run_app()}} for immediately running the application. +} diff --git a/man/run_app.Rd b/man/run_app.Rd index db863e1..876f496 100644 --- a/man/run_app.Rd +++ b/man/run_app.Rd @@ -17,3 +17,6 @@ run_app(host = "127.0.0.1", port = 3464, custom_dataset = NULL) \description{ Run the application server. } +\seealso{ +\code{\link[=app]{app()}} for retrieving a Shiny app object. +}