rstudio/plumber

document that local variables are ok

Open

#330 建立於 2018年11月2日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)R (1,437 star) (257 fork)batch import
difficulty: novicedocseffort: lowhelp wanted

描述

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

貢獻者指南