Skip to content
Back to formatted view

Raw Message

Message-ID: <430DAFC5.50700@ipimar.pt>
Date: 2005-08-25T11:47:17Z
From: Ernesto Jardim
Subject: Code in lattice::dotplot function.

Hi,

I'm trying to understand the code of lattice functions so that I can
write some S4 methods using lattice. The following code is a snipet of
dotplot that is reused in several other functions. I don't understand
why this is needed can someone help ?

Thanks

EJ

[...]

    right.name <- deparse(substitute(formula))
    try(formula <- eval(formula), silent = TRUE)
    foo <- substitute(formula)

    if (!(is.call(foo) && foo[[1]] == "~")) {
        formula <- as.formula(paste("~", right.name)) #   deparse(foo)))
        environment(formula) <- parent.frame()
    }

[...]