mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 19:57:24 +01:00
app: Expose Shiny app object
This commit is contained in:
parent
766a84291b
commit
a7d02bc9f2
4 changed files with 40 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
22
R/app.R
22
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.
|
||||
|
|
|
|||
18
man/app.Rd
Normal file
18
man/app.Rd
Normal file
|
|
@ -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.
|
||||
}
|
||||
|
|
@ -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.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue