【发布时间】:2019-03-19 23:40:50
【问题描述】:
假设我有以下代码:
maybeBrowser <- function (msg) {
if (interactive()) {
cat(msg, "\n")
???
} else {
stop(msg)
}
}
foo <- function (cond, ...) {
if (cond) maybeBrowser("What a mess")
}
什么会???如果 cond 评估为 TRUE,则必须看起来像这样才能在 foo 的上下文中调用 browser()?
【问题讨论】:
标签: r