rstudio/plumber

document that local variables are ok

Open

#330 aberto em 2 de nov. de 2018

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)R (257 forks)batch import
difficulty: novicedocseffort: lowhelp wanted

Métricas do repositório

Stars
 (1.437 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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

Guia do colaborador