Using a single object to pass multiple arguments to a function?

后端 未结 1 1020
半阙折子戏
半阙折子戏 2021-01-06 22:00

Let\'s say I have a function that can\'t be altered, like:

add.these <- function(x,y,z) {
  x + y + z
}

And I want to p

相关标签:
1条回答
  • 2021-01-06 22:25

    Are you looking for do.call?

    > args=list(1,2,3)
    > do.call(add.these,args)
    [1] 6
    
    0 讨论(0)
提交回复
热议问题