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
6f84555b9f
commit
13b3c2b119
4 changed files with 40 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
# Generated by roxygen2: do not edit by hand
|
# Generated by roxygen2: do not edit by hand
|
||||||
|
|
||||||
export(analyze)
|
export(analyze)
|
||||||
|
export(app)
|
||||||
export(box_plot)
|
export(box_plot)
|
||||||
export(overview_plot)
|
export(overview_plot)
|
||||||
export(rank_genes)
|
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
|
#' @param custom_dataset This allows to set a custom dataset (return value of
|
||||||
#' [analyze()]) as the default dataset of the UI.
|
#' [analyze()]) as the default dataset of the UI.
|
||||||
#'
|
#'
|
||||||
|
#' @seealso [app()] for retrieving a Shiny app object.
|
||||||
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
run_app <- function(host = "127.0.0.1",
|
run_app <- function(host = "127.0.0.1",
|
||||||
port = 3464,
|
port = 3464,
|
||||||
custom_dataset = NULL) {
|
custom_dataset = NULL) {
|
||||||
runApp(
|
runApp(
|
||||||
shinyApp(
|
app(custom_dataset = custom_dataset),
|
||||||
ui(custom_dataset = custom_dataset),
|
|
||||||
server(custom_dataset = custom_dataset)
|
|
||||||
),
|
|
||||||
host = host,
|
host = host,
|
||||||
port = port
|
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.
|
#' Run the Ubigen API.
|
||||||
#'
|
#'
|
||||||
#' This requires the `plumber` package to be installed.
|
#' 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{
|
\description{
|
||||||
Run the application server.
|
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