R/traceutil.R

Defines functions trace.exit trace.enter getTraceMark

getTraceMark = function() {
    "[TRACE] ";
}

trace.enter = function(name, ...) {
    if (getPipelineOption("trace") == "enabled") {
        step = getPackageVariable("trace.step");
        level = getPackageVariable("trace.level");
        level = level + 1;
        
        setPackageVariable("trace.level" = level);
        
        cat(paste(date(), getMark(), getTraceMark(), 
            paste(rep(step, level),collapse=""), ">", " ", name, ... , "\n", sep=""));
    }
}

trace.exit = function(name, ...) {
    if (getPipelineOption("trace") == "enabled") {
        level = getPackageVariable("trace.level");
        if (level > 0) {
            setPackageVariable("trace.level" = (level - 1));
        }
    }
}

Try the ArrayExpressHTS package in your browser

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

ArrayExpressHTS documentation built on Nov. 8, 2020, 7:50 p.m.