Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有具有三个单独参数的函数
fun <- function(a,b,c){ a+b^2*c }
如何使用单个向量调用它
my_vector <- c(1,2,3) fun(my_vector)
试试这个:
> do.call("fun", as.list(my_vector)) [1] 13