rstudio/plumber

document that local variables are ok

Open

#330 ouverte le 2 nov. 2018

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)R (257 forks)batch import
difficulty: novicedocseffort: lowhelp wanted

Métriques du dépôt

Stars
 (1 437 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur