From 8f6ebc290f4c2d82a0b429c37fac116bcc2f4036 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Thu, 19 May 2022 16:28:59 +0200 Subject: [PATCH] Allow changing the application title --- R/app.R | 5 ++++- R/ui.R | 2 +- man/run_app.Rd | 10 +++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/R/app.R b/R/app.R index 4015b66..72a2e1f 100644 --- a/R/app.R +++ b/R/app.R @@ -12,12 +12,14 @@ #' performing custom analyses. If this is set to `TRUE`, only the predefined #' gene and species sets are available for customizing the analysis. This may #' be useful to limit resource usage on a publicly available instance. +#' @param title Set the title of the application. #' @param port The port to serve the application on. #' #' @export run_app <- function(gene_sets, species_sets = NULL, locked = FALSE, + title = "Gene Position Analysis", port = 3464) { stopifnot(!is.null(gene_sets) & !is.null(gene_sets[[1]])) @@ -29,7 +31,8 @@ run_app <- function(gene_sets, options <- list( gene_sets = gene_sets, species_sets = species_sets, - locked = locked + locked = locked, + title = title ) # Actually run the app. diff --git a/R/ui.R b/R/ui.R index f649d2b..cf12dde 100644 --- a/R/ui.R +++ b/R/ui.R @@ -14,7 +14,7 @@ ui <- function(options) { bootswatch = "united", primary = "#1964bf" ), - title = "TPE-OLD candidates", + title = options$title, selected = "Results", tabPanel( "Input data", diff --git a/man/run_app.Rd b/man/run_app.Rd index 231e0fd..dc5c920 100644 --- a/man/run_app.Rd +++ b/man/run_app.Rd @@ -4,7 +4,13 @@ \alias{run_app} \title{Run the application server.} \usage{ -run_app(gene_sets, species_sets = NULL, locked = FALSE, port = 3464) +run_app( + gene_sets, + species_sets = NULL, + locked = FALSE, + title = "Gene Position Analysis", + port = 3464 +) } \arguments{ \item{gene_sets}{A list of predefined gene sets. This should be a named list @@ -22,6 +28,8 @@ performing custom analyses. If this is set to \code{TRUE}, only the predefined gene and species sets are available for customizing the analysis. This may be useful to limit resource usage on a publicly available instance.} +\item{title}{Set the title of the application.} + \item{port}{The port to serve the application on.} } \description{