【发布时间】:2021-12-26 05:17:23
【问题描述】:
所以我想将 func1 的输出传递给 func2。
func1 <- function(x, y, z) {
k = x*2
j = y*2
i = z*2
}
func2 <- function(x, y, z) {
func1(x, y, z)
m = k * j * i
return (m)
}
它不断打印错误。
【问题讨论】:
-
您的 func1 没有返回任何内容。您的 func2 不需要 return(),只需要 m。