aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NAMESPACE2
-rw-r--r--R/web.R (renamed from R/app.R)28
-rw-r--r--inst/web/app.R (renamed from inst/app/app.R)0
-rw-r--r--inst/web/index.html (renamed from inst/app/index.html)0
-rw-r--r--inst/web/scripts/data.R (renamed from inst/app/scripts/data.R)0
-rw-r--r--inst/web/scripts/estimators.R (renamed from inst/app/scripts/estimators.R)0
-rw-r--r--inst/web/templates/content.html (renamed from inst/app/templates/content.html)0
-rw-r--r--inst/web/templates/content/about.html (renamed from inst/app/templates/content/about.html)0
-rw-r--r--inst/web/templates/content/data.html (renamed from inst/app/templates/content/data.html)0
-rw-r--r--inst/web/templates/content/data/enter-data.html (renamed from inst/app/templates/content/data/enter-data.html)0
-rw-r--r--inst/web/templates/content/data/enter-data/load-samples.html (renamed from inst/app/templates/content/data/enter-data/load-samples.html)0
-rw-r--r--inst/web/templates/content/data/enter-data/manual-entry.html (renamed from inst/app/templates/content/data/enter-data/manual-entry.html)0
-rw-r--r--inst/web/templates/content/data/enter-data/required-format.html (renamed from inst/app/templates/content/data/enter-data/required-format.html)0
-rw-r--r--inst/web/templates/content/data/enter-data/upload-data.html (renamed from inst/app/templates/content/data/enter-data/upload-data.html)0
-rw-r--r--inst/web/templates/content/data/view-data.html (renamed from inst/app/templates/content/data/view-data.html)0
-rw-r--r--inst/web/templates/content/data/view-data/data-plots.html (renamed from inst/app/templates/content/data/view-data/data-plots.html)0
-rw-r--r--inst/web/templates/content/data/view-data/data-table.html (renamed from inst/app/templates/content/data/view-data/data-table.html)0
-rw-r--r--inst/web/templates/content/estimation.html (renamed from inst/app/templates/content/estimation.html)0
-rw-r--r--inst/web/templates/content/estimation/about-estimators.html (renamed from inst/app/templates/content/estimation/about-estimators.html)0
-rw-r--r--inst/web/templates/content/estimation/about-estimators/id.html (renamed from inst/app/templates/content/estimation/about-estimators/id.html)0
-rw-r--r--inst/web/templates/content/estimation/about-estimators/idea.html (renamed from inst/app/templates/content/estimation/about-estimators/idea.html)0
-rw-r--r--inst/web/templates/content/estimation/about-estimators/panel.html (renamed from inst/app/templates/content/estimation/about-estimators/panel.html)0
-rw-r--r--inst/web/templates/content/estimation/about-estimators/seq_bayes.html (renamed from inst/app/templates/content/estimation/about-estimators/seq_bayes.html)0
-rw-r--r--inst/web/templates/content/estimation/about-estimators/wp.html (renamed from inst/app/templates/content/estimation/about-estimators/wp.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates.html (renamed from inst/app/templates/content/estimation/estimates.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/add-estimators.html (renamed from inst/app/templates/content/estimation/estimates/add-estimators.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/add-estimators/id.html (renamed from inst/app/templates/content/estimation/estimates/add-estimators/id.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/add-estimators/idea.html (renamed from inst/app/templates/content/estimation/estimates/add-estimators/idea.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/add-estimators/mu.html (renamed from inst/app/templates/content/estimation/estimates/add-estimators/mu.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/add-estimators/parameters.html (renamed from inst/app/templates/content/estimation/estimates/add-estimators/parameters.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/add-estimators/seq_bayes.html (renamed from inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/add-estimators/wp.html (renamed from inst/app/templates/content/estimation/estimates/add-estimators/wp.html)0
-rw-r--r--inst/web/templates/content/estimation/estimates/estimates-table.html (renamed from inst/app/templates/content/estimation/estimates/estimates-table.html)0
-rw-r--r--inst/web/templates/content/help.html (renamed from inst/app/templates/content/help.html)0
-rw-r--r--inst/web/templates/content/help/panel.html (renamed from inst/app/templates/content/help/panel.html)0
-rw-r--r--inst/web/templates/content/help/serial-interval.html (renamed from inst/app/templates/content/help/serial-interval.html)0
-rw-r--r--inst/web/templates/footer.html (renamed from inst/app/templates/footer.html)0
-rw-r--r--inst/web/templates/navbar.html (renamed from inst/app/templates/navbar.html)0
-rw-r--r--inst/web/templates/tabs.html (renamed from inst/app/templates/tabs.html)0
-rw-r--r--inst/web/www/script.js (renamed from inst/app/www/script.js)0
-rw-r--r--inst/web/www/styles.css (renamed from inst/app/www/styles.css)0
-rw-r--r--man/app.Rd11
-rw-r--r--man/web.Rd31
43 files changed, 55 insertions, 17 deletions
diff --git a/NAMESPACE b/NAMESPACE
index 1557cc1..140ea5f 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,9 +1,9 @@
# Generated by roxygen2: do not edit by hand
-export(app)
export(id)
export(idea)
export(seq_bayes)
+export(web)
export(wp)
importFrom(stats,pgamma)
importFrom(stats,qgamma)
diff --git a/R/app.R b/R/web.R
index 23e32ab..ecfd501 100644
--- a/R/app.R
+++ b/R/web.R
@@ -1,17 +1,35 @@
#' Launch the Rnaught Web Application
#'
+#' This is the entry point of the Rnaught web application, which creates and
+#' returns a Shiny app object. When invoked directly, the web application is
+#' launched.
+#'
+#' The following dependencies are required to run the application:
+#' * [shiny](https://shiny.posit.co)
+#' * [bslib](https://rstudio.github.io/bslib)
+#' * [DT](https://rstudio.github.io/DT)
+#' * [plotly](https://plotly-r.com)
+#'
+#' If any of the above packages are missing during launch, a prompt will appear
+#' to install them.
+#'
+#' To configure settings such as the port, host or default browser, set Shiny's
+#' global options (see [shiny::runApp()]).
+#'
+#' @return A Shiny app object for the Rnaught web application.
+#'
#' @importFrom utils install.packages
#'
#' @export
-app <- function() {
+web <- function() {
missing_pkgs <- c()
# Check for any missing, required packages.
- if (!requireNamespace("bslib", quietly = TRUE)) {
- missing_pkgs <- c(missing_pkgs, "bslib")
- }
if (!requireNamespace("shiny", quietly = TRUE)) {
missing_pkgs <- c(missing_pkgs, "shiny")
}
+ if (!requireNamespace("bslib", quietly = TRUE)) {
+ missing_pkgs <- c(missing_pkgs, "bslib")
+ }
if (!requireNamespace("DT", quietly = TRUE)) {
missing_pkgs <- c(missing_pkgs, "DT")
}
@@ -35,5 +53,5 @@ app <- function() {
}
}
- shiny::runApp(appDir = system.file("app", package = "Rnaught"))
+ shiny::shinyAppDir(appDir = system.file("web", package = "Rnaught"))
}
diff --git a/inst/app/app.R b/inst/web/app.R
index 639dc87..639dc87 100644
--- a/inst/app/app.R
+++ b/inst/web/app.R
diff --git a/inst/app/index.html b/inst/web/index.html
index 504918d..504918d 100644
--- a/inst/app/index.html
+++ b/inst/web/index.html
diff --git a/inst/app/scripts/data.R b/inst/web/scripts/data.R
index 8f8694c..8f8694c 100644
--- a/inst/app/scripts/data.R
+++ b/inst/web/scripts/data.R
diff --git a/inst/app/scripts/estimators.R b/inst/web/scripts/estimators.R
index 7c457ea..7c457ea 100644
--- a/inst/app/scripts/estimators.R
+++ b/inst/web/scripts/estimators.R
diff --git a/inst/app/templates/content.html b/inst/web/templates/content.html
index da69f08..da69f08 100644
--- a/inst/app/templates/content.html
+++ b/inst/web/templates/content.html
diff --git a/inst/app/templates/content/about.html b/inst/web/templates/content/about.html
index 73b75ea..73b75ea 100644
--- a/inst/app/templates/content/about.html
+++ b/inst/web/templates/content/about.html
diff --git a/inst/app/templates/content/data.html b/inst/web/templates/content/data.html
index 574f003..574f003 100644
--- a/inst/app/templates/content/data.html
+++ b/inst/web/templates/content/data.html
diff --git a/inst/app/templates/content/data/enter-data.html b/inst/web/templates/content/data/enter-data.html
index 254f1d7..254f1d7 100644
--- a/inst/app/templates/content/data/enter-data.html
+++ b/inst/web/templates/content/data/enter-data.html
diff --git a/inst/app/templates/content/data/enter-data/load-samples.html b/inst/web/templates/content/data/enter-data/load-samples.html
index 2a4f013..2a4f013 100644
--- a/inst/app/templates/content/data/enter-data/load-samples.html
+++ b/inst/web/templates/content/data/enter-data/load-samples.html
diff --git a/inst/app/templates/content/data/enter-data/manual-entry.html b/inst/web/templates/content/data/enter-data/manual-entry.html
index a6319d9..a6319d9 100644
--- a/inst/app/templates/content/data/enter-data/manual-entry.html
+++ b/inst/web/templates/content/data/enter-data/manual-entry.html
diff --git a/inst/app/templates/content/data/enter-data/required-format.html b/inst/web/templates/content/data/enter-data/required-format.html
index 724dd83..724dd83 100644
--- a/inst/app/templates/content/data/enter-data/required-format.html
+++ b/inst/web/templates/content/data/enter-data/required-format.html
diff --git a/inst/app/templates/content/data/enter-data/upload-data.html b/inst/web/templates/content/data/enter-data/upload-data.html
index 740047b..740047b 100644
--- a/inst/app/templates/content/data/enter-data/upload-data.html
+++ b/inst/web/templates/content/data/enter-data/upload-data.html
diff --git a/inst/app/templates/content/data/view-data.html b/inst/web/templates/content/data/view-data.html
index 880cf7f..880cf7f 100644
--- a/inst/app/templates/content/data/view-data.html
+++ b/inst/web/templates/content/data/view-data.html
diff --git a/inst/app/templates/content/data/view-data/data-plots.html b/inst/web/templates/content/data/view-data/data-plots.html
index 5019088..5019088 100644
--- a/inst/app/templates/content/data/view-data/data-plots.html
+++ b/inst/web/templates/content/data/view-data/data-plots.html
diff --git a/inst/app/templates/content/data/view-data/data-table.html b/inst/web/templates/content/data/view-data/data-table.html
index 590a5b9..590a5b9 100644
--- a/inst/app/templates/content/data/view-data/data-table.html
+++ b/inst/web/templates/content/data/view-data/data-table.html
diff --git a/inst/app/templates/content/estimation.html b/inst/web/templates/content/estimation.html
index 5764057..5764057 100644
--- a/inst/app/templates/content/estimation.html
+++ b/inst/web/templates/content/estimation.html
diff --git a/inst/app/templates/content/estimation/about-estimators.html b/inst/web/templates/content/estimation/about-estimators.html
index db2898b..db2898b 100644
--- a/inst/app/templates/content/estimation/about-estimators.html
+++ b/inst/web/templates/content/estimation/about-estimators.html
diff --git a/inst/app/templates/content/estimation/about-estimators/id.html b/inst/web/templates/content/estimation/about-estimators/id.html
index fc70b1c..fc70b1c 100644
--- a/inst/app/templates/content/estimation/about-estimators/id.html
+++ b/inst/web/templates/content/estimation/about-estimators/id.html
diff --git a/inst/app/templates/content/estimation/about-estimators/idea.html b/inst/web/templates/content/estimation/about-estimators/idea.html
index 67548f8..67548f8 100644
--- a/inst/app/templates/content/estimation/about-estimators/idea.html
+++ b/inst/web/templates/content/estimation/about-estimators/idea.html
diff --git a/inst/app/templates/content/estimation/about-estimators/panel.html b/inst/web/templates/content/estimation/about-estimators/panel.html
index 98fe155..98fe155 100644
--- a/inst/app/templates/content/estimation/about-estimators/panel.html
+++ b/inst/web/templates/content/estimation/about-estimators/panel.html
diff --git a/inst/app/templates/content/estimation/about-estimators/seq_bayes.html b/inst/web/templates/content/estimation/about-estimators/seq_bayes.html
index 8f66ab4..8f66ab4 100644
--- a/inst/app/templates/content/estimation/about-estimators/seq_bayes.html
+++ b/inst/web/templates/content/estimation/about-estimators/seq_bayes.html
diff --git a/inst/app/templates/content/estimation/about-estimators/wp.html b/inst/web/templates/content/estimation/about-estimators/wp.html
index c6f4580..c6f4580 100644
--- a/inst/app/templates/content/estimation/about-estimators/wp.html
+++ b/inst/web/templates/content/estimation/about-estimators/wp.html
diff --git a/inst/app/templates/content/estimation/estimates.html b/inst/web/templates/content/estimation/estimates.html
index bc9124e..bc9124e 100644
--- a/inst/app/templates/content/estimation/estimates.html
+++ b/inst/web/templates/content/estimation/estimates.html
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators.html b/inst/web/templates/content/estimation/estimates/add-estimators.html
index 60111c7..60111c7 100644
--- a/inst/app/templates/content/estimation/estimates/add-estimators.html
+++ b/inst/web/templates/content/estimation/estimates/add-estimators.html
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/id.html b/inst/web/templates/content/estimation/estimates/add-estimators/id.html
index 7c35e55..7c35e55 100644
--- a/inst/app/templates/content/estimation/estimates/add-estimators/id.html
+++ b/inst/web/templates/content/estimation/estimates/add-estimators/id.html
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/idea.html b/inst/web/templates/content/estimation/estimates/add-estimators/idea.html
index 781349f..781349f 100644
--- a/inst/app/templates/content/estimation/estimates/add-estimators/idea.html
+++ b/inst/web/templates/content/estimation/estimates/add-estimators/idea.html
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/mu.html b/inst/web/templates/content/estimation/estimates/add-estimators/mu.html
index 8781574..8781574 100644
--- a/inst/app/templates/content/estimation/estimates/add-estimators/mu.html
+++ b/inst/web/templates/content/estimation/estimates/add-estimators/mu.html
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html b/inst/web/templates/content/estimation/estimates/add-estimators/parameters.html
index 5250e31..5250e31 100644
--- a/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html
+++ b/inst/web/templates/content/estimation/estimates/add-estimators/parameters.html
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html b/inst/web/templates/content/estimation/estimates/add-estimators/seq_bayes.html
index 028fabc..028fabc 100644
--- a/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html
+++ b/inst/web/templates/content/estimation/estimates/add-estimators/seq_bayes.html
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/wp.html b/inst/web/templates/content/estimation/estimates/add-estimators/wp.html
index 511170f..511170f 100644
--- a/inst/app/templates/content/estimation/estimates/add-estimators/wp.html
+++ b/inst/web/templates/content/estimation/estimates/add-estimators/wp.html
diff --git a/inst/app/templates/content/estimation/estimates/estimates-table.html b/inst/web/templates/content/estimation/estimates/estimates-table.html
index 4704d03..4704d03 100644
--- a/inst/app/templates/content/estimation/estimates/estimates-table.html
+++ b/inst/web/templates/content/estimation/estimates/estimates-table.html
diff --git a/inst/app/templates/content/help.html b/inst/web/templates/content/help.html
index df4e887..df4e887 100644
--- a/inst/app/templates/content/help.html
+++ b/inst/web/templates/content/help.html
diff --git a/inst/app/templates/content/help/panel.html b/inst/web/templates/content/help/panel.html
index 9eb6e2e..9eb6e2e 100644
--- a/inst/app/templates/content/help/panel.html
+++ b/inst/web/templates/content/help/panel.html
diff --git a/inst/app/templates/content/help/serial-interval.html b/inst/web/templates/content/help/serial-interval.html
index e061115..e061115 100644
--- a/inst/app/templates/content/help/serial-interval.html
+++ b/inst/web/templates/content/help/serial-interval.html
diff --git a/inst/app/templates/footer.html b/inst/web/templates/footer.html
index 19d4b0c..19d4b0c 100644
--- a/inst/app/templates/footer.html
+++ b/inst/web/templates/footer.html
diff --git a/inst/app/templates/navbar.html b/inst/web/templates/navbar.html
index d447fba..d447fba 100644
--- a/inst/app/templates/navbar.html
+++ b/inst/web/templates/navbar.html
diff --git a/inst/app/templates/tabs.html b/inst/web/templates/tabs.html
index 351b480..351b480 100644
--- a/inst/app/templates/tabs.html
+++ b/inst/web/templates/tabs.html
diff --git a/inst/app/www/script.js b/inst/web/www/script.js
index 30066d1..30066d1 100644
--- a/inst/app/www/script.js
+++ b/inst/web/www/script.js
diff --git a/inst/app/www/styles.css b/inst/web/www/styles.css
index a6fc3cd..a6fc3cd 100644
--- a/inst/app/www/styles.css
+++ b/inst/web/www/styles.css
diff --git a/man/app.Rd b/man/app.Rd
deleted file mode 100644
index f558dc9..0000000
--- a/man/app.Rd
+++ /dev/null
@@ -1,11 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/app.R
-\name{app}
-\alias{app}
-\title{Launch the Rnaught Web Application}
-\usage{
-app()
-}
-\description{
-Launch the Rnaught Web Application
-}
diff --git a/man/web.Rd b/man/web.Rd
new file mode 100644
index 0000000..36bce07
--- /dev/null
+++ b/man/web.Rd
@@ -0,0 +1,31 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/web.R
+\name{web}
+\alias{web}
+\title{Launch the Rnaught Web Application}
+\usage{
+web()
+}
+\value{
+A Shiny app object for the Rnaught web application.
+}
+\description{
+This is the entry point of the Rnaught web application, which creates and
+returns a Shiny app object. When invoked directly, the web application is
+launched.
+}
+\details{
+The following dependencies are required to run the application:
+\itemize{
+\item \href{https://shiny.posit.co}{shiny}
+\item \href{https://rstudio.github.io/bslib}{bslib}
+\item \href{https://rstudio.github.io/DT}{DT}
+\item \href{https://plotly-r.com}{plotly}
+}
+
+If any of the above packages are missing during launch, a prompt will appear
+to install them.
+
+To configure settings such as the port, host or default browser, set Shiny's
+global options (see \code{\link[shiny:runApp]{shiny::runApp()}}).
+}