R/prolog.R

Defines functions plotmo.prolog.default plotmo.prolog

Documented in plotmo.prolog

# prolog.R: plotmo.prolog functions, called at the start of plotmo and plotres

# gets called at the start of plotmo and plotres
plotmo.prolog <- function(object, object.name, trace, ...)
{
    trace2(trace, "--plotmo_prolog for %s object %s\n",
           class.as.char(object), object.name)

    UseMethod("plotmo.prolog")
}
plotmo.prolog.default <- function(object, object.name, ...)
{
    # prevent confusing downstream errors by doing an initial check here
    if(is.null(getCall(object)) && is.null(object[["x"]]))
        stopf("%s does not have a 'call' field or %s",
              object.name,
              if(is.null(object[["y"]])) "'x' and 'y' fields"
              else                       "an 'x' field")
    object
}

Try the plotmo package in your browser

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

plotmo documentation built on May 29, 2024, 12:19 p.m.