rstudio/plumber

document that local variables are ok

オープン

#330 opened on 2018/11/02

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)R (257 件のフォーク)batch import
difficulty: novicedocseffort: lowhelp wanted

Repository metrics

Stars
 (1,437 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド