How can one pass a local variable in a function as default to a nested one in R?

前端 未结 0 592
没有蜡笔的小新
没有蜡笔的小新 2021-01-23 15:07

Example:

test_fn1 <- function(b,passed=pass){
b*passed}

test_fn2 <- function(a){
pass=10;
print(test_fn1(a))}

test_fn2(2)

It can\'t find

相关标签:
回答
  • 消灭零回复
提交回复
热议问题