Change default arguments of an R function at runtime

后端 未结 4 2165
离开以前
离开以前 2021-02-19 22:59

Is it possible to change the default values of formal parameters in an R function at runtime?

Let\'s assume, we have the function

f <- function(x=1) {         


        
4条回答
  •  囚心锁ツ
    2021-02-19 23:38

    UPDATE: 2020-12-13

    This method is no longer available

    Yes, the Defaults package allows you to do this.

提交回复
热议问题