标签: r function scoping
我想了解是否将一个功能设置为另一个功能的默认值是否引起任何问题?这显然不是最佳实践吗?
add_this <- function(a = 1, b = 2){ a + b } print_what_we_added <- function(the_sum = add_this()){ paste0("the sum of what we added is ", the_sum) } print_what_we_added() print_what_we_added(5)