rstudio/plumber

document that local variables are ok

Open

#330 geöffnet am 2. Nov. 2018

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)R (257 Forks)batch import
difficulty: novicedocseffort: lowhelp wanted

Repository-Metriken

Stars
 (1.437 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

The router below works as expected.

#* @get /a
(function(){
  cat("sourced!\n")
  function() {
    valueA
  }
})()

#* @get /b
function() {
  valueA
}

valueA <- 4

It should be added to the documentation here: https://www.rplumber.io/docs/runtime.html#environments

Ref: https://github.com/trestletech/plumber/issues/329

Contributor Guide