Skip to content

Commit 9857ee7

Browse files
committed
Clarify geopressureviz return and save behavior
Update R and Rd docs to clarify geopressureviz return values and storage: when run_bg = FALSE the edited path is returned invisibly on app close and is stored in the Shiny option 'path_geopressureviz' (readable later in the same R session); when run_bg = TRUE the background process object is returned and the path is not returned to the calling console. Also document that the app Save button writes the current path to ./data/interim/{id}-path-geopressureviz.csv.
1 parent 21bbee0 commit 9857ee7

2 files changed

Lines changed: 30 additions & 10 deletions

File tree

R/geopressureviz.R

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@
1010
#' file that contains at least `tag` (and optionally `marginal`, `path_most_likely`,
1111
#' `pressurepath`, `pressurepath_most_likely`).
1212
#'
13-
#' You can retrieve the edited path from the return value of this function (when `run_bg = FALSE`)
14-
#' or with `shiny::getShinyOption("path_geopressureviz")` after the app completes.
13+
#' When `run_bg = FALSE`, the app stores the current edited path in the Shiny option
14+
#' `path_geopressureviz` and returns it invisibly when the app closes. You can capture it from the
15+
#' return value of this function or retrieve it afterwards in the same R session with
16+
#' `shiny::getShinyOption("path_geopressureviz")`.
17+
#'
18+
#' When `run_bg = TRUE`, the function returns the background process object instead of the edited
19+
#' path.
20+
#'
21+
#' The app `Save` button writes the current path to `./data/interim/{id}-path-geopressureviz.csv`.
1522
#'
1623
#' Learn more about GeoPressureViz in the [GeoPressureManual
1724
#' ](https://geopressure.org/GeoPressureManual/geopressureviz.html).
@@ -31,9 +38,12 @@
3138
#' Rstudio.
3239
#' @param run_bg If true, the app runs in a background R session using the `callr` package. This
3340
#' allows you to continue using your R session while the app is running.
34-
#' @return When `run_bg = FALSE`: The updated path visualized in the app. Can also be retrieved with
35-
#' `shiny::getShinyOption("path_geopressureviz")` after the app completes.
36-
#' When `run_bg = TRUE`: Returns the background process object.
41+
#' @return When `run_bg = FALSE`: The edited path, returned invisibly when the app closes. During
42+
#' the app session, the current path is also stored in the Shiny option
43+
#' `shiny::getShinyOption("path_geopressureviz")`, which can be read afterwards in the same R
44+
#' session.
45+
#' When `run_bg = TRUE`: The background process object. In this case the edited path is not
46+
#' returned to the calling console session.
3747
#' @examplesIf FALSE
3848
#' geopressureviz("18LX")
3949
#' @seealso [GeoPressureManual

man/geopressureviz.Rd

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)