R/utils-debug.R

Defines functions `srcc` `.Debug`

`.DebugPrint` <-
function (x) {
    if (isTRUE(getOption("debug.MuMIn"))) {
		fun <- asChar(sys.call(sys.parent())[[1L]])
		name <- substitute(x)
		cat(sprintf("<%s> ~ ", fun))
		if(is.language(name)) cat(asChar(name), "= \n")
        print(x)
    }
}
	
`.Debug` <- 
function(expr) {
	if(isTRUE(getOption("debug.MuMIn"))) {
		eval.parent(substitute(expr))
	}
}

`srcc` <- function() {
	ret <- eval(expression(source("clipboard", local = TRUE)), .GlobalEnv)
	return(if(ret$visible) ret$value else invisible(ret$value))
}

Try the MuMIn package in your browser

Any scripts or data that you put into this service are public.

MuMIn documentation built on June 22, 2024, 6:44 p.m.