rstudio/plumber

document that local variables are ok

Open

#330 aperta il 2 nov 2018

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)R (257 fork)batch import
difficulty: novicedocseffort: lowhelp wanted

Metriche repository

Star
 (1437 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor