Displaying 1 result from an estimated 1 matches for "desiredformula".
2005 Feb 07
2
Environment of a formula
...he columns.
Up to now we have been doing this by giving the data frame
a `formula' attribute, that can be passed to plot.formula.
For example
dat <- data.frame(x=1:100,y=runif(100),z=100:1)
attr(dat, "plotme") <- (z ~ x)
......
......
if(missing(desiredformula))
desiredformula <- attr(dat, "plotme")
plot(desiredformula, data=dat)
We just got bitten by the fact that a formula object has a `.Environment'
attribute, which may be huge, depending on the environment
in which the formula was created. In the example above there is
no upp...