我有嵌套函数,并希望将参数传递给最深的函数.最深的函数已经有默认参数,所以我将更新这些参数值.
我的mwe正在使用plot(),但实际上我正在png()使用默认的高度和宽度参数.
有什么建议?
f1 <- function(...){ f2(...)}
f2 <- function(...){ f3(...)}
f3 <- function(...){ plot(xlab="hello1", ...)}
#this works
f1(x=1:10,y=rnorm(10),type='b')
# I want to update the default xlab value, but it fails:
f1(x=1:10,y=rnorm(10),type='b', xlab='hello2')
Run Code Online (Sandbox Code Playgroud)